]> git.mxchange.org Git - quix0rs-blobwars.git/commitdiff
Set LC_NUMERIC to C.
authorGuus Sliepen <guus@debian.org>
Mon, 10 Aug 2015 14:10:28 +0000 (16:10 +0200)
committerGuus Sliepen <guus@debian.org>
Mon, 10 Aug 2015 14:10:28 +0000 (16:10 +0200)
This prevents floating point values that are stored as ASCII in files
from being misinterpreted if the locale changes.

src/main.cpp

index a92a49b046fc3c27bfc91d68a6c13e6a9e872c84..9282a1e23a764f703ef04405f927274f077d0031 100644 (file)
@@ -137,6 +137,7 @@ int main(int argc, char *argv[])
 
        bindtextdomain("blobwars", LOCALEDIR);
        setlocale(LC_ALL, "");
+       setlocale(LC_NUMERIC, "C");
        textdomain("blobwars");
 
        atexit(cleanup);