You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that the first-pass compilation step is ignoring directive giving errors, so anything after the .ascii (or .asciiz) directive that is not a double quote will silently fail
In first-pass function, if directive returns something different from 0, it is not an error.
if (directive(1,ptr,line)) return0;
sprintf(txt,"Pasada 1 - Error en linea %d\n",lineptr);
AfxMessageBox(txt);
return1;
In the directive function, not finding the double quote, returns -1, that is is an error. But the above function takes it as no error.
case1: // .asciizif (CODEORDATA==CODE) returnFALSE;
ptr=eatwhite(ptr);
if (ptr==NULL) return (-1);
if (*ptr!='"' && *ptr!='\'') return (-1);
The obvious fix seems to be to replace the if of the first-pass function to check for greater than 0, instead of just not 0.
if (directive(1,ptr,line) > 0) return0;
When I have some time I will try this fix and test if it does not break anything, as this is very old code and it could trigger other side effects.
It seems that the first-pass compilation step is ignoring directive giving
errors, so anything after the .ascii (or .asciiz) directive that is not a
double quote will silently fail
In first-pass function, if directive returns something different from 0,
it is not an error.
if (directive(1,ptr,line)) return 0;
sprintf(txt,"Pasada 1 - Error en linea %d\n",lineptr);
AfxMessageBox(txt);
return 1;
In the directive function, not finding the double quote, returns -1, that
is is an error. But the above function takes it as no error.
case 1: // .asciiz
if (CODEORDATA==CODE) return FALSE;
ptr=eatwhite(ptr);
if (ptr==NULL) return (-1);
if (*ptr!='"' && *ptr!='\'') return (-1);
The obvious fix seems to be to replace the if of the first-pass function
to check for greater than 0, instead of just not 0.
if (directive(1,ptr,line) > 0) return 0;
When I have some time I will try this fix and test if it does not break
anything, as this is very old code and it could trigger other side effects.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMA6B2FYZZFLUAFON2BJI3SNP5C3ANCNFSM4TFLI6JQ>
.
The following variable declaration is ignored by WinMIPS.
Replacing
“Hola”
with"Hola"
fixes the issue but an error should be raised instead.The text was updated successfully, but these errors were encountered: