mirror of
https://github.com/cc65/cc65.git
synced 2024-07-10 23:29:05 +00:00
Fixed a pointer-difference, comparison-with-zero expression.
Some GCC C compilers can't subtract higher pointers from lower pointers properly, when those pointers must be scaled (because they point to objects that are wider than a char). The scaling is done as unsigned which makes the difference positive instead of negative. So, a broken expression was changed into a direct comparison between the two pointers.
This commit is contained in:
parent
99f3c7d01d
commit
8f0ea644dd
@ -562,7 +562,7 @@ yylook()
|
|||||||
}
|
}
|
||||||
|
|
||||||
# ifdef LEXDEBUG
|
# ifdef LEXDEBUG
|
||||||
if((*(lsp-1)-yysvec-1)<0)
|
if (*(lsp-1) < yysvec + 1)
|
||||||
{
|
{
|
||||||
fprintf(yyout,"yylook: stopped (end)\n");
|
fprintf(yyout,"yylook: stopped (end)\n");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user