mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 20:44:14 +02:00
Merge pull request #328 from kordero/master
fixing sscanf issue with floats for certain locales
This commit is contained in:
commit
c8c4b8fda5
1 changed files with 3 additions and 0 deletions
|
@ -13,6 +13,8 @@
|
|||
#error "This is an implementation file - not intended for direct inclusion."
|
||||
#endif
|
||||
|
||||
#include <locale.h>
|
||||
|
||||
#include "Config.h"
|
||||
|
||||
#include "starfield/data/InputVertex.h"
|
||||
|
@ -99,6 +101,7 @@ namespace starfield {
|
|||
// parse
|
||||
float azi, alt;
|
||||
unsigned c;
|
||||
setlocale(LC_NUMERIC, "C");
|
||||
if (sscanf(line, " %f %f #%x", & azi, & alt, & c) == 3) {
|
||||
|
||||
if (spaceFor( getBrightness(c) )) {
|
||||
|
|
Loading…
Reference in a new issue