Fixed a few bugs

git-svn-id: svn://svn.cc65.org/cc65/trunk@2860 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2003-12-30 22:42:49 +00:00
parent d428d3cec7
commit 6d49e06fa2

View File

@@ -345,7 +345,7 @@ static ExprNode* FuncBlank (void)
} }
NextTok (); NextTok ();
} }
return 0; Result = 0;
} }
return GenLiteralExpr (Result); return GenLiteralExpr (Result);
} }
@@ -431,7 +431,7 @@ static ExprNode* DoMatch (enum TC EqualityLevel)
/* We may not end-of-line of end-of-file here */ /* We may not end-of-line of end-of-file here */
if (TokIsSep (Tok)) { if (TokIsSep (Tok)) {
Error ("Unexpected end of line"); Error ("Unexpected end of line");
return 0; return GenLiteralExpr (0);
} }
/* Get a node with this token */ /* Get a node with this token */
@@ -462,7 +462,7 @@ static ExprNode* DoMatch (enum TC EqualityLevel)
/* We may not end-of-line of end-of-file here */ /* We may not end-of-line of end-of-file here */
if (TokIsSep (Tok)) { if (TokIsSep (Tok)) {
Error ("Unexpected end of line"); Error ("Unexpected end of line");
return 0; return GenLiteralExpr (0);
} }
/* Compare the tokens if the result is not already known */ /* Compare the tokens if the result is not already known */
@@ -644,7 +644,7 @@ static ExprNode* FuncStrAt (void)
/* Must be a valid index */ /* Must be a valid index */
if (Index >= (long) strlen (Str)) { if (Index >= (long) strlen (Str)) {
Error ("Range error"); Error ("Range error");
return 0; return GenLiteralExpr (0);
} }
/* Get the char, handle as unsigned. Be sure to translate it into /* Get the char, handle as unsigned. Be sure to translate it into