Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/mainstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,10 @@ void exec_for(void) {
}
basicvars.current++;
switch (forvar.typeinfo) { /* Assign control variable's initial value */
case VAR_UINT8: forvar.typeinfo = VAR_INTWORD;
case VAR_UINT8:
forvar.typeinfo = VAR_INTWORD;
*forvar.address.intaddr = pop_anynum32();
break;
case VAR_INTWORD:
*forvar.address.intaddr = pop_anynum32();
break;
Expand Down
12 changes: 6 additions & 6 deletions src/miscprocs.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,14 +403,14 @@ static void strip(char line[]) {
** contains nothing
*/
boolean read_line(char line[], int32 linelen) {
readstate result;
int32 result;
line[0] = asc_NUL;
result = kbd_readline(line, linelen, 0);
if (result==-READ_ESC || basicvars.escape) {
if (result==-1 || basicvars.escape) {
error(ERR_ESCAPE);
return FALSE;
}
if (result==-READ_EOF) return FALSE; /* Read failed - Hit EOF */
if (result==-2) return FALSE; /* Read failed - Hit EOF */
strip(line);
return TRUE;
}
Expand All @@ -426,13 +426,13 @@ boolean read_line(char line[], int32 linelen) {
** is prefilled with a string
*/
boolean amend_line(char line[], int32 linelen) {
readstate result;
int32 result;
result = kbd_readline(line, linelen,0);
if (result==-READ_ESC || basicvars.escape) {
if (result==-1 || basicvars.escape) {
error(ERR_ESCAPE);
return FALSE;
}
if (result==-READ_EOF) return FALSE; /* Read failed - Hit EOF */
if (result==-2) return FALSE; /* Read failed - Hit EOF */
strip(line);
return TRUE;
}
Expand Down
6 changes: 3 additions & 3 deletions src/tokens.c
Original file line number Diff line number Diff line change
Expand Up @@ -2458,8 +2458,8 @@ int32 reformat(byte *tp, byte *tokenbuf, int32 ftype) {
} else {
p = twobyte_token[token2-ACORNTWO_LOWEST]; /* C8 8E+n */
tp++;
break;
}
break;
case ACORN_COMMAND: /* C7 nn */
if (token2>ACORNCMD_HIGHEST) {
if((int32)(token2-ACORN_OTHER) < 0) { /* Sanity check */
Expand All @@ -2474,8 +2474,8 @@ int32 reformat(byte *tp, byte *tokenbuf, int32 ftype) {
p = command_token[token-ACORNCMD_LOWEST]; /* C7 8E+n */
}
tp++;
break;
}
break;
case ACORN_OTHER: /* C6 nn */
if (token2>ACORNOTH_HIGHEST) {
if((int32)(token2-ACORN_OTHER) < 0) { /* Sanity check */
Expand All @@ -2490,8 +2490,8 @@ int32 reformat(byte *tp, byte *tokenbuf, int32 ftype) {
p = other_token[token-ACORNOTH_LOWEST];
}
tp++;
break;
}
break;
} /* switch */
}
}
Expand Down