Skip to content

Commit

Permalink
Fix for infinite looping with unterminated msgsends and array literals.
Browse files Browse the repository at this point in the history
[cappuccino#161 state:resolved]

Reviewed by me.
  • Loading branch information
Francisco Ryan Tolmasky I committed Dec 12, 2008
1 parent 79ba2af commit 5f66874
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Objective-J/preprocess.js
Expand Up @@ -848,6 +848,10 @@ objj_preprocessor.prototype.preprocess = function(tokens, /*objj_stringBuffer*/
CONCAT(buffer, token);
}

// If we get this far and we're parsing an objj_msgSend (or array), then we have a problem.
if (tuple)
objj_exception_throw(new objj_exception(OBJJParseException, "*** Expected ']' - Unterminated message send or array."));

if (!aStringBuffer)
return buffer;
}
Expand Down

0 comments on commit 5f66874

Please sign in to comment.