gecko/gfx/angle/angle-bug-93.patch

28 lines
704 B
Diff

# HG changeset patch
# Parent fc2b34772d39957b66ae1bcb9f3f0d1af9cdb3e8
diff --git a/gfx/angle/src/compiler/util.cpp b/gfx/angle/src/compiler/util.cpp
--- a/gfx/angle/src/compiler/util.cpp
+++ b/gfx/angle/src/compiler/util.cpp
@@ -13,17 +13,20 @@
#include <locale.h>
#else
#include <sstream>
#endif
double atof_dot(const char *str)
{
#ifdef _MSC_VER
- return _atof_l(str, _create_locale(LC_NUMERIC, "C"));
+ _locale_t l = _create_locale(LC_NUMERIC, "C");
+ double result = _atof_l(str, l);
+ _free_locale(l);
+ return result;
#else
double result;
std::istringstream s(str);
std::locale l("C");
s.imbue(l);
s >> result;
return result;
#endif