1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-10 13:29:50 +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:
Greg King 2017-03-01 06:36:25 -05:00
parent 99f3c7d01d
commit 8f0ea644dd

View File

@ -562,7 +562,7 @@ yylook()
}
# ifdef LEXDEBUG
if((*(lsp-1)-yysvec-1)<0)
if (*(lsp-1) < yysvec + 1)
{
fprintf(yyout,"yylook: stopped (end)\n");
}