"Jaco Greeff" jaco@puxedo.org wrote:
Ok, try number 3. I've made the changes as requested
- Get result length before allocating and copying with WideCharToMultiByte;
- Make intentions clear on strncat, replaced with strcat
- Removed CHAR castings to get the WCHAR formatting character.
- Fixes as requested by Dimitri and included in previous version;
You are still using L prefix and redundant (WCHAR) casts.
Instead of if (*szFmt == (WCHAR)L'-') and case (WCHAR)L'd': ADD_FORMAT_TYPE(VFMT_INTEGER, "d");
simple if (*szFmt == '-') and case 'd': ADD_FORMAT_TYPE(VFMT_INTEGER, "d");
will do the job.