]> granicus.if.org Git - yasm/commitdiff
Check count returned by nasm_parser_input() against 0 instead of just a short
authorPeter Johnson <peter@tortall.net>
Thu, 16 Jan 2003 08:51:11 +0000 (08:51 -0000)
committerPeter Johnson <peter@tortall.net>
Thu, 16 Jan 2003 08:51:11 +0000 (08:51 -0000)
count to detect EOF.

svn path=/trunk/yasm/; revision=819

modules/parsers/nasm/nasm-token.re
src/parsers/nasm/nasm-token.re

index 46daee4ce4c48c31518d68d9acf13ac952ac5700..e6d2ead01ca30854bed6755ecf679399246345df 100644 (file)
@@ -93,7 +93,7 @@ fill(YYCTYPE *cursor)
                xfree(s.bot);
            s.bot = buf;
        }
-       if((cnt = nasm_parser_input(s.lim, BSIZE)) != BSIZE){
+       if((cnt = nasm_parser_input(s.lim, BSIZE)) == 0){
            s.eof = &s.lim[cnt]; *s.eof++ = '\n';
        }
        s.lim += cnt;
index 46daee4ce4c48c31518d68d9acf13ac952ac5700..e6d2ead01ca30854bed6755ecf679399246345df 100644 (file)
@@ -93,7 +93,7 @@ fill(YYCTYPE *cursor)
                xfree(s.bot);
            s.bot = buf;
        }
-       if((cnt = nasm_parser_input(s.lim, BSIZE)) != BSIZE){
+       if((cnt = nasm_parser_input(s.lim, BSIZE)) == 0){
            s.eof = &s.lim[cnt]; *s.eof++ = '\n';
        }
        s.lim += cnt;