This commit is contained in:
jim 2012-09-08 20:40:50 -07:00
parent d1d9ff27a4
commit f20ba8640b

View File

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