1
0
mirror of https://github.com/cc65/cc65.git synced 2024-09-29 02:55:20 +00:00

Fixed a bug reported by thefox: The .CHARMAP command must not accept indices

or character codes with a value of zero. The assembler runs into a CHECK in
tgttrans anyway if the index is zero.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5826 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2012-09-17 15:09:39 +00:00
parent b9d9513f76
commit e6b52ee8d0

View File

@ -626,7 +626,7 @@ static void DoCharMap (void)
/* Read the index as numerical value */
Index = ConstExpression ();
if (Index < 0 || Index > 255) {
if (Index <= 0 || Index > 255) {
/* Value out of range */
ErrorSkip ("Range error");
return;
@ -637,7 +637,7 @@ static void DoCharMap (void)
/* Read the character code */
Code = ConstExpression ();
if (Code < 0 || Code > 255) {
if (Code <= 0 || Code > 255) {
/* Value out of range */
ErrorSkip ("Range error");
return;