mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-15 08:39:45 +00:00
AGS: Fixed StrUtil::StringToFloat()
From upstream 6942e5dde0cbc82e7870d7652c3f49095f4c641b
This commit is contained in:
parent
68e5184afa
commit
d6cf666e42
@ -65,7 +65,7 @@ float StrUtil::StringToFloat(const String &s, float def_val) {
|
||||
if (!s.GetCStr())
|
||||
return def_val;
|
||||
char *stop_ptr;
|
||||
int val = strtof(s.GetCStr(), &stop_ptr);
|
||||
float val = strtof(s.GetCStr(), &stop_ptr);
|
||||
return (stop_ptr == s.GetCStr() + s.GetLength()) ? val : def_val;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user