Using the names 'result' and 'dest' for a pointer to the next character to be parsed is confusing in this context. This should be replaced with the name 'current'.
Created attachment 235739 [details] Proposed patch
Comment on attachment 235739 [details] Proposed patch I don’t think this is an improvement. In a function that both reads and writes, it’s confusing to have a variable named “current” that is the pointer to the next place to write. Sounds like it could be the next byte to read too. So result may be bad, but I don’t think current is better, at least in some of these functions.