]> git.sesse.net Git - movit/blobdiff - init.cpp
Release Movit 1.3.2. (From a branch, since I do not want to break ABI compatibility...
[movit] / init.cpp
index b9e68ab16e9d0c9ed164ea28b7f47b03d253f681..2bade83c782fbc1e7d2d152b6ff0b0004515f2bd 100644 (file)
--- a/init.cpp
+++ b/init.cpp
@@ -379,7 +379,10 @@ double get_glsl_version()
        // Now we have something on the form X.YY. We convert it to a float, and hope
        // that if it's inexact (e.g. 1.30), atof() will round the same way the
        // compiler will.
-       float glsl_version = atof(glsl_version_str);
+       std::istringstream locale_convert(glsl_version_str);
+       locale_convert.imbue(std::locale("C"));
+       double glsl_version;
+       locale_convert >> glsl_version;
        free(glsl_version_str);
 
        return glsl_version;