Changed: Replaced atof by NLMISC::fromString

--HG--
branch : hotfix
hg/compatibility
kervala 10 years ago
parent 3039428094
commit 6853497593

@ -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

@ -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;

Loading…
Cancel
Save