Changed: Replaced atof by NLMISC::fromString

--HG--
branch : hotfix
This commit is contained in:
kervala 2015-02-14 12:43:29 +01:00
parent 3039428094
commit 6853497593
2 changed files with 5 additions and 3 deletions

View file

@ -201,7 +201,7 @@ bool CTpSpawnZone::build(const NLLIGO::CPrimPoint * point)
nlwarning("<CTpSpawnZone build> : no z in CTpSpawnZone '%s'",_Name.c_str() ); nlwarning("<CTpSpawnZone build> : no z in CTpSpawnZone '%s'",_Name.c_str() );
return false; return false;
} }
Point.z = ( float ) atof( value.c_str() ); NLMISC::fromString(value, Point.z);
Point.z = float( sint32 (1000.0f* Point.z) ); Point.z = float( sint32 (1000.0f* Point.z) );
} }
else else

View file

@ -905,14 +905,16 @@ bool CDatabase::set(RY_PDS::TTableIndex table, RY_PDS::TRowIndex row, RY_PDS::TC
case PDS_float: case PDS_float:
{ {
float data = (float)atof(value.c_str()); float data;
NLMISC::fromString(value, data);
return set(table, row, column, sizeof(data), &data); return set(table, row, column, sizeof(data), &data);
} }
break; break;
case PDS_double: case PDS_double:
{ {
double data = (double)atof(value.c_str()); double data;
NLMISC::fromString(value, data);
return set(table, row, column, sizeof(data), &data); return set(table, row, column, sizeof(data), &data);
} }
break; break;