fixed warning

This commit is contained in:
albertodemichelis 2016-03-22 22:17:39 +08:00
parent ce0a33a591
commit 04a4ff5c8d

View File

@ -17,13 +17,13 @@ static bool str2num(const SQChar *s,SQObjectPtr &res,SQInteger base)
{ {
SQChar *end; SQChar *end;
const SQChar *e = s; const SQChar *e = s;
SQBool isEIntBase = base > 13; //to fix error converting hexadecimals with e like 56f0791e bool iseintbase = base > 13; //to fix error converting hexadecimals with e like 56f0791e
SQBool isfloat = SQFalse; bool isfloat = false;
SQChar c; SQChar c;
while((c = *e) != _SC('\0')) while((c = *e) != _SC('\0'))
{ {
if(c == _SC('.') || (!isEIntBase && (c == _SC('E')|| c == _SC('e')))) { //e and E is for scientific notation if (c == _SC('.') || (!iseintbase && (c == _SC('E') || c == _SC('e')))) { //e and E is for scientific notation
isfloat = SQTrue; isfloat = true;
break; break;
} }
e++; e++;