decode_pointer_inplace on the string abc~1xyz~0123 will produce the string abc~/xy~~01 instead of abc/xyz~123.
also the function doesn't return a boolean to indicate that the operation failed,
I don't know what the standard says about an invalid ponter in a patch, but I think it should fail the patch.
decode_pointer_inplace on the string
abc~1xyz~0123
will produce the stringabc~/xy~~01
instead ofabc/xyz~123
. also the function doesn't return a boolean to indicate that the operation failed, I don't know what the standard says about an invalid ponter in a patch, but I think it should fail the patch.suggested solution: static BOOL decode_pointer_inplace(unsigned char string) { unsigned char decoded_string = string;
}