Skip to content

Commit 7e7a81f

Browse files
committed
feature: allow variables in lockzone/unlockzone
1 parent 8cafad6 commit 7e7a81f

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

statements.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,9 +1150,10 @@ void lockzone (char **statement)
11501150

11511151
assertminimumargs (statement, "lockzone", 1);
11521152
removeCR (statement[2]);
1153-
int zone = strictatoi (statement[2]);
11541153

1155-
printf (" ldx #%d\n", zone);
1154+
printf (" ldx ");
1155+
printimmed (statement[2]);
1156+
printf ("%s\n", statement[2]);
11561157
printf (" jsr lockzonex\n");
11571158

11581159
if (zonelocking == 0)
@@ -1170,10 +1171,12 @@ void unlockzone (char **statement)
11701171

11711172
assertminimumargs (statement, "unlockzone", 1);
11721173
removeCR (statement[2]);
1173-
int zone = strictatoi (statement[2]);
11741174

1175-
printf (" ldx #%d\n", zone);
1175+
printf (" ldx ");
1176+
printimmed (statement[2]);
1177+
printf ("%s\n", statement[2]);
11761178
printf (" jsr unlockzonex\n");
1179+
11771180
if (zonelocking == 0)
11781181
{
11791182
strcpy (redefined_variables[numredefvars++], "CHECKOVERWRITE = 1");

0 commit comments

Comments
 (0)