mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 11:17:34 +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."
|
#error "This is an implementation file - not intended for direct inclusion."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <locale.h>
|
||||||
|
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
|
|
||||||
#include "starfield/data/InputVertex.h"
|
#include "starfield/data/InputVertex.h"
|
||||||
|
@ -99,6 +101,7 @@ namespace starfield {
|
||||||
// parse
|
// parse
|
||||||
float azi, alt;
|
float azi, alt;
|
||||||
unsigned c;
|
unsigned c;
|
||||||
|
setlocale(LC_NUMERIC, "C");
|
||||||
if (sscanf(line, " %f %f #%x", & azi, & alt, & c) == 3) {
|
if (sscanf(line, " %f %f #%x", & azi, & alt, & c) == 3) {
|
||||||
|
|
||||||
if (spaceFor( getBrightness(c) )) {
|
if (spaceFor( getBrightness(c) )) {
|
||||||
|
|
Loading…
Reference in a new issue