String woes


Why does:

return “0.0” (Windows, latest tip) ??



There’s nothing wrong with the code, and this works on other OSes. But on win32, it seems that if the first parameter to the function is a reference, then the va_arg stuff just fails. Looks like their va_start macro contains some stupid code that does a sizeof on the reference, and calculates the wrong address from it.

By changing the format parameter from a const String& to a const String, it all works fine. Jeez…