Boris Zbarsky schrieb:
Ulrich Kaminski wrote:
const char* cpValues = "0.0000000000, 0.0000000000, 0.0000000000";
float3 kFloat3;
const int iValues = sscanf_s( cpValues, "%f, %f, %f", kFloat3.x,
kFloat3.y, kFloat3.z );
Assertion( iValues == 3 );
iValues is always 1.
Just as a sanity check, if you make those numbers nonzero (and different
from each other, and with nonzero fractional parts) and then examine the
values of the three variables, what do they look like?
Does the behavior depend on your locale?
What happens if you exchange the roles of '.' and ',' in that string?
-Boris
jep, thanks, you were 100% right :D
calling
setlocale( LC_ALL, "English" );
right after initializing xpcom made it work again. But why is mozilla
setting the locale automatically? this messes up a lot in the
integration. Is there some kind of parameter or setter I can use to
avoid those kinds of problems?
best regards, Ulrich
_______________________________________________
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding