From e6b52ee8d07a80b03e1843f2be3d4d6b7e5d90d7 Mon Sep 17 00:00:00 2001 From: uz Date: Mon, 17 Sep 2012 15:09:39 +0000 Subject: [PATCH] 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 --- src/ca65/pseudo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ca65/pseudo.c b/src/ca65/pseudo.c index 3318628ad..4bafb8626 100644 --- a/src/ca65/pseudo.c +++ b/src/ca65/pseudo.c @@ -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; -- 2.39.5