gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 3c13d7eeb8495ae15d70541a14aa1da90fcc5abd parent d7265ebb0e80e2bd2c365161a864bede3ac2292c Author: Toxa <56631470+untoxa@users.noreply.github.com> Date: Mon, 28 Dec 2020 12:01:21 +0300 Merge pull request #115 from bbbbbr/develop_lcc_addr_def_fix Lcc: Fix broken Fixllist() :) Diffstat:
| M | gbdk-support/lcc/lcc.c | 15 | ++++++++++++--- |
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/gbdk-support/lcc/lcc.c b/gbdk-support/lcc/lcc.c @@ -73,7 +73,7 @@ static int verbose; /* incremented for each -v */ static List bankpacklist; /* bankpack flags */ static List ihxchecklist; /* ihxcheck flags */ static List mkbinlist; /* loader files, flags */ -static List llist[2]; /* loader files, flags */ +static List llist[2]; /* [1] = loader files, [0] = flags */ static List alist; /* assembler flags */ List clist; /* compiler flags */ static List plist; /* preprocessor flags */ @@ -255,12 +255,21 @@ static void Fixllist() b = b->link; if(b->str[1] == 'g' || b->str[1] == 'b') { - if(BEGINS_WITH(strchr(b->str, '.'), "_shadow_OAM=")) + // '-g' and '-b' now have their values separated by a space. + // That splits them into two consecutive llist items, + // so try advancing to the next item to access it's value. + // Example: b = "-g", next = ".STACK=0xE000" + if (b != llist[0]) + b = b->link; + else + break; // end of list + + if(BEGINS_WITH(strchr(b->str, '_'), "_shadow_OAM=")) oamDefFound = 1; else if(BEGINS_WITH(strchr(b->str, '.'), ".STACK=")) stackDefFound = 1; else if(BEGINS_WITH(strchr(b->str, '.'), ".refresh_OAM=")) - stackDefFound = 1; + refreshOAMDefFound = 1; else if(BEGINS_WITH(strchr(b->str, '_'), "_DATA=")) dataDefFound = 1; else if(BEGINS_WITH(strchr(b->str, '_'), "_CODE="))
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.