Browse Source

Fix incorrect management of C locale in vrml plugin

pull/3/merge
jp-charras 9 years ago
parent
commit
4a3cb050ed
  1. 6
      plugins/3d/vrml/vrml.cpp

6
plugins/3d/vrml/vrml.cpp

@ -158,15 +158,19 @@ bool CanRender( void )
class LOCALESWITCH
{
// Store the user locale name, to restore this locale later, in dtor
std::string m_locale;
public:
LOCALESWITCH()
{
m_locale = setlocale( LC_NUMERIC, 0 );
setlocale( LC_NUMERIC, "C" );
}
~LOCALESWITCH()
{
setlocale( LC_NUMERIC, "" );
setlocale( LC_NUMERIC, m_locale.c_str() );
}
};

Loading…
Cancel
Save