mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
if statement
treat "true" as a bool in getInt check (inside if statements for strings) no longer convert all "true" and "false" to ints
This commit is contained in:
parent
e56f4cb6a6
commit
d6a79e4f5b
3 changed files with 11 additions and 25 deletions
|
|
@ -2827,18 +2827,6 @@ static int Sc_ScanString(int ret)
|
|||
if(!collapseEscape(CMDtext+1))
|
||||
return -1;
|
||||
|
||||
const char* scannedStr = CMDtext + 1;
|
||||
|
||||
if (dStrcmp(scannedStr, "true") == 0) {
|
||||
CMDlval.i = MakeToken<int>(1, yylineno);
|
||||
return INTCONST;
|
||||
}
|
||||
|
||||
if (dStrcmp(scannedStr, "false") == 0) {
|
||||
CMDlval.i = MakeToken<int>(0, yylineno);
|
||||
return INTCONST;
|
||||
}
|
||||
|
||||
dsize_t bufferLen = dStrlen( CMDtext );
|
||||
char* buffer = ( char* ) consoleAlloc( bufferLen );
|
||||
dStrcpy( buffer, CMDtext + 1, bufferLen );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue