Fix rgbasm -b and rgbasm -g (#1052)

Fixes #1051
This commit is contained in:
Rangi
2022-09-25 04:22:55 -04:00
committed by GitHub
parent 5ad8a8c958
commit f88968ec20
7 changed files with 12 additions and 4 deletions

View File

@@ -182,7 +182,7 @@ int main(int argc, char *argv[])
switch (ch) {
case 'b':
if (strlen(musl_optarg) == 2)
opt_B(&musl_optarg[1]);
opt_B(musl_optarg);
else
errx("Must specify exactly 2 characters for option 'b'");
break;
@@ -204,7 +204,7 @@ int main(int argc, char *argv[])
case 'g':
if (strlen(musl_optarg) == 4)
opt_G(&musl_optarg[1]);
opt_G(musl_optarg);
else
errx("Must specify exactly 4 characters for option 'g'");
break;

View File

@@ -1,2 +1,4 @@
PRINTLN %Oo_Oo_Oo
OPT b.X
PRINTLN %..X.X.X.
PRINTLN %..X._X.X.

1
test/asm/opt-b.flags Normal file
View File

@@ -0,0 +1 @@
-Weverything -b oO

View File

@@ -1 +1,2 @@
$2A
$2A

View File

@@ -1,2 +1,4 @@
PRINTLN `pqpq_rsrs
OPT g.x0X
PRINTLN `.x.x0X0X
PRINTLN `.x.x_0X0X

1
test/asm/opt-g.flags Normal file
View File

@@ -0,0 +1 @@
-Weverything -g pqrs

View File

@@ -1 +1,2 @@
$F55
$F55