git.y1.nz

gbdk-2020

GameBoy Development Kit
download: https://git.y1.nz/archives/gbdk.tar.gz
README | Files | Log | Refs | LICENSE

commit 0627a856f0e85be8a9b9098fbd73c5863ca92b5a
parent b133b51177ce1a04cf1eaaa3d8ea9d8f4f521de8
Author: bbbbbr <reg+github@roughhousing.com>
Date:   Tue,  4 May 2021 16:31:01 -0700

Merge pull request #173 from basxto/develop

Work around segfault when using -Wl-yp
Diffstat:
Mgbdk-support/lcc/lcc.c6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gbdk-support/lcc/lcc.c b/gbdk-support/lcc/lcc.c @@ -858,8 +858,12 @@ static void opt(char *arg) { tmp2[0] = '\0'; // Zero out second arg by default if(arg[4] == 'y') { sprintf(tmp, "%c%c%c", arg[3], arg[4], arg[5]); //-yo -ya -yt -yl -yk -yn -yp - if (!(arg[5] == 'c' || arg[5] == 'C' || arg[5] == 's' || arg[5] == 'S' || arg[5] == 'j')) // Don't add second arg for -yc -yC -ys -yS -yj + if (!(arg[5] == 'c' || arg[5] == 'C' || arg[5] == 's' || arg[5] == 'S' || arg[5] == 'j' || arg[5] == 'p')) // Don't add second arg for -yc -yC -ys -yS -yj sprintf(tmp2, "%s", &arg[6]); + // -yp of SDCC 4.1.0's makebin erroneously does not use a space between flag and it's value + // So append trailing values to first arg that would otherwise go in the second arg + if (arg[5] == 'p') + sprintf(tmp, "%s", &arg[3]); // If MBC option is present for makebin (-Wl-yt <n> or -Wm-yt <n>) then make a copy for bankpack to use if (arg[5] == 't')

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.