Fixed a bug in the handling of ranges where the granularity is not one: An

internally generated label could disrupt the output of such a range by
adding an offset not equal to the granularity. The solution is to only
add dependent labels within such a range on all addresses that do not
match the granularity (odd addresses for a .word table for example).


git-svn-id: svn://svn.cc65.org/cc65/trunk@3002 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2004-04-29 14:00:28 +00:00
parent 3ccd9f97c7
commit 1ae117fed8
5 changed files with 191 additions and 53 deletions

View File

@@ -6,7 +6,7 @@
/* */
/* */
/* */
/* (C) 2000-2003 Ullrich von Bassewitz */
/* (C) 2000-2004 Ullrich von Bassewitz */
/* R<>merstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
@@ -189,7 +189,7 @@ unsigned AddrTable (void)
const char* Label = GetLabel (Addr);
if (Label == 0) {
/* OOPS! Should not happen */
Internal ("OOPS - Label for address %04X disappeard!", Addr);
Internal ("OOPS - Label for address 0x%06X disappeard!", Addr);
}
Indent (MIndent);
Output (".addr");
@@ -249,7 +249,7 @@ unsigned RtsTable (void)
const char* Label = GetLabel (Addr);
if (Label == 0) {
/* OOPS! Should not happen */
Internal ("OOPS - Label for address %04X disappeard!", Addr);
Internal ("OOPS - Label for address 0x%06X disappeard!", Addr);
}
Indent (MIndent);
Output (".word");