master
jim 2012-09-08 20:40:50 -07:00
parent d1d9ff27a4
commit f20ba8640b
1 changed files with 2 additions and 2 deletions

View File

@ -153,7 +153,7 @@ public:
inline int ToInt(int base=10) const
{
if(lpString && *lpString <= 0x39 && *lpString >= 0x30)
if(lpString && ValidIntString(lpString))
return tstring_base_to_int(lpString, NULL, base);
else
return 0;
@ -161,7 +161,7 @@ public:
inline float ToFloat() const
{
if(lpString && *lpString <= 0x39 && *lpString >= 0x30)
if(lpString && ValidFloatString(lpString))
return (float)tstof(lpString);
else
return 0.0f;