mirror of
https://github.com/cc65/cc65.git
synced 2025-01-11 11:30:13 +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:
parent
b9d9513f76
commit
e6b52ee8d0
@ -626,7 +626,7 @@ static void DoCharMap (void)
|
|||||||
|
|
||||||
/* Read the index as numerical value */
|
/* Read the index as numerical value */
|
||||||
Index = ConstExpression ();
|
Index = ConstExpression ();
|
||||||
if (Index < 0 || Index > 255) {
|
if (Index <= 0 || Index > 255) {
|
||||||
/* Value out of range */
|
/* Value out of range */
|
||||||
ErrorSkip ("Range error");
|
ErrorSkip ("Range error");
|
||||||
return;
|
return;
|
||||||
@ -637,7 +637,7 @@ static void DoCharMap (void)
|
|||||||
|
|
||||||
/* Read the character code */
|
/* Read the character code */
|
||||||
Code = ConstExpression ();
|
Code = ConstExpression ();
|
||||||
if (Code < 0 || Code > 255) {
|
if (Code <= 0 || Code > 255) {
|
||||||
/* Value out of range */
|
/* Value out of range */
|
||||||
ErrorSkip ("Range error");
|
ErrorSkip ("Range error");
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user