Browse Source

Fix a bug where read_size is incremented more than once inside the loop.

mingodad 10 years ago
parent
commit
4403bdf171
1 changed files with 1 additions and 1 deletions
  1. 1 1
      SquiLu/sqstdlib/sqstdstream.cpp

+ 1 - 1
SquiLu/sqstdlib/sqstdstream.cpp

@@ -35,7 +35,7 @@ SQInteger _stream_read_line(HSQUIRRELVM v) {
                 goto done;
             }
         }
-        if(read_size == size) ++m;
+        if(read_size >= size) ++m; //eof reached read_size < size ?
     }
 done:
     read_size += (m*size);