Miko?aj Zalewski wrote: > Andrew Talbot wrote: > I've wrote that code and forgot that sizeof(parameter array) is the > size of a pointer. The current code will actually work as in current > wine there is no locale that has more than one character (plus the NUL > terminator) for the decimal or thousand separator but it's better to fix > it to use the whole buffer in case a locale with a strange separator is > added. I've chosen the value 8 because I can't imagine a longer > separator. I agree #defining a constant for it (and using it in > FillNumberFmt, FormatInt, FormatDouble) would be good but writing it as > 4*sizeof(WCHAR) isn't a good idea as the fourth parameter is the number > of characters, not the number of bytes. > > Mikolaj Zalewski
Hi Mikolaj, I am about to submit another try, to see what people think. This time I'm using GetLocaleInfoW() twice for each buffer: once, to determine the size needed, and again, to actually get the locale info. -- Andy.