Skip to content

Commit

Permalink
Fixed x.y++ and similar to assign an empty string if x.y is non-numeric.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lexikos committed Jan 5, 2012
1 parent b780a4f commit 0bd7465
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions source/script_object_bif.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,11 @@ void BIF_ObjIncDec(ExprTokenType &aResultToken, ExprTokenType *aParam[], int aPa

if (current_value.symbol == PURE_NOT_NUMERIC)
{
// Value is non-numeric, so return "".
aResultToken.symbol = SYM_STRING;
aResultToken.marker = _T("");
return;
// Value is non-numeric, so assign and return "".
value_to_set.symbol = SYM_STRING;
value_to_set.marker = _T("");
//current_value.symbol = SYM_STRING; // Already done (SYM_STRING == PURE_NOT_NUMERIC).
current_value.marker = _T("");
}

// Although it's likely our caller's param array has enough space to hold the extra
Expand Down

0 comments on commit 0bd7465

Please sign in to comment.