mirror of
https://github.com/cc65/cc65.git
synced 2025-01-08 20:31:31 +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
|
||||
if((*(lsp-1)-yysvec-1)<0)
|
||||
if (*(lsp-1) < yysvec + 1)
|
||||
{
|
||||
fprintf(yyout,"yylook: stopped (end)\n");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user