On 11 Apr 2017, at 5:06 am, Alexandre Julliard <julliard(a)winehq.org> wrote:
Hugh McMaster <hugh.mcmaster(a)outlook.com> writes:
+ while (*buf == ' ' || *buf == '\t') buf++; + if (!*buf) goto exit; + + p = buf; + while (isxdigit(*p)) + { + count++; + p++; } - return TRUE; + if (count > 8) goto exit; + + end = p; + while (*p == ' ' || *p == '\t') p++; + if (*p && *p != ';') goto exit; + + *end = 0; + *dw = strtoul(buf, &end, 16); + ret = TRUE; + + exit: + if (!ret) output_message(STRING_INVALID_HEX); + HeapFree(GetProcessHeap(), 0, buf);
The pointer has been modified, you need to free the original one.
Okay. While I'm looking at this again, do you want everything done in WCHARs? The conversion to char* is a holdover from the original code.