]> git.xonotic.org Git - xonotic/netradiant.git/commit
In Radiant main() method, add putenv("LC_NUMERIC=C").
authorrambetter <rambetter@8a3a26a2-13c4-0310-b231-cf6edde360e5>
Sun, 14 Nov 2010 01:40:25 +0000 (01:40 +0000)
committerrambetter <rambetter@8a3a26a2-13c4-0310-b231-cf6edde360e5>
Sun, 14 Nov 2010 01:40:25 +0000 (01:40 +0000)
commit4f88b9d8117c1951132cb49862185845d492bd00
tree38c11c9fdd6ef600bf3b492e166300c30cef7468
parent41fa84d593181f31c845a5c1c84447ed0a58da02
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: https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/trunk@334 8a3a26a2-13c4-0310-b231-cf6edde360e5
radiant/main.cpp