Fix possible bugs when having deeper pointers than probably intended.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@685 4a71c877-e1ca-e34f-864e-861f7616d084
master
Dennis Schridde 2006-09-03 20:32:01 +00:00
parent 6094ea9bbf
commit 915390aa1b
2 changed files with 5 additions and 5 deletions

View File

@ -4958,7 +4958,7 @@ BOOL scriptAddVariable(VAR_DECL *psStorage, VAR_IDENT_DECL *psVarIdent)
if(psStorage->storage == ST_LOCAL)
{
if(scriptLookUpVariable(psVarIdent->pIdent, &ppsVarSym))
if(scriptLookUpVariable(psVarIdent->pIdent, ppsVarSym))
{
debug(LOG_ERROR, "var found");
debug(LOG_ERROR, "var=%s, index=%d of %d", psVarIdent->pIdent, (*ppsVarSym)->index, psCurEvent->numParams);
@ -5540,7 +5540,7 @@ void scriptSetTypeTab(TYPE_SYMBOL *psTypeTab)
{
ASSERT( psTypeTab[i].typeID == type,
"scriptSetTypeTab: ID's must be >= VAL_USERTYPESTART and sequential" );
type += 1;
type = type + 1;
}
#endif
@ -5583,7 +5583,7 @@ void scriptSetCallbackTab(CALLBACK_SYMBOL *psCallTab)
{
ASSERT( psCallTab[i].type == type,
"scriptSetCallbackTab: ID's must be >= VAL_CALLBACKSTART and sequential" );
type += 1;
type = type + 1;
}
#endif

View File

@ -501,8 +501,8 @@ BOOL stackBinaryOp(OPCODE opcode)
break;
case OP_CANC: //String cancatenation
{
char *tempstr1[MAXSTRLEN];
char *tempstr2[MAXSTRLEN];
char tempstr1[MAXSTRLEN];
char tempstr2[MAXSTRLEN];
/* Check first value if it's compatible with Strings */
if((psV1->type == VAL_INT) || (psV1->type == VAL_BOOL)) //First value isn't string, but can be converted to string