]> git.xonotic.org Git - xonotic/netradiant.git/commit
In Radiant main() method, add putenv("LC_NUMERIC=C").
authorrambetter <rambetter>
Sun, 14 Nov 2010 01:40:25 +0000 (01:40 +0000)
committerrambetter <rambetter>
Sun, 14 Nov 2010 01:40:25 +0000 (01:40 +0000)
commitfdab9dc6e2e95be09fcf25a179084f4dd6c4c1af
tree38c11c9fdd6ef600bf3b492e166300c30cef7468
parent11bb5b57208c958da43fb3e632e6b15210c5270e
In Radiant main() method, add putenv("LC_NUMERIC=C").
sscanf() and *printf() calls are all over the code, which are
locale-sensitive.  gtk_init() sets all locales.  So if you're in
Germany, your printf()'s will output e.g. "10,5" for ten and
a half.  Reading floating points with sscanf() is also totally broken
in locales such as Germany.  So, we can't really get rid of all the
*scanf()'s and the *printf()'s.  Instead, set LC_NUMERIC to "C".

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@334 8a3a26a2-13c4-0310-b231-cf6edde360e5
radiant/main.cpp