Fix potential buffer underflow When the string 'name' start with a '-' ptr == name and so --ptr will underflow, this patch corrected this by checking ptr before decrementing.