char* string;
uint8_t str_length;
size_t r;
+ enum HPCS_ParseCode ret;
fseek(datafile, offset, SEEK_SET);
if (feof(datafile))
#ifdef _WIN32
/* String is stored as native Windows WCHAR */
- return __win32_wchar_to_utf8(result, string);
+ ret = __win32_wchar_to_utf8(result, string);
#else
/* Explicitly convert from UTF-16LE (internal WCHAR representation) */
- return __unix_wchar_to_utf8(result, string, str_length * SEGMENT_SIZE);
+ ret = __unix_wchar_to_utf8(result, string, str_length * SEGMENT_SIZE);
#endif
+ free(string);
+ return ret;
}
/** Platform-specific functions */