Changeset 1593


Ignore:
Timestamp:
01/06/07 23:17:09 (6 years ago)
Author:
sam
Message:
  • Fix a bug in the fgetln() implementation. The newline was not properly accounted for in the returned length.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/src/load-stream.c

    r1591 r1593  
    437437    fuzz = _zz_getfuzz(fd); 
    438438 
    439     for(i = size = 0; ; i++) 
     439    for(i = size = 0; ; /* i is incremented below */) 
    440440    { 
    441441        int ch; 
     
    455455        _zz_addpos(fd, 1); 
    456456 
    457         if(fuzz->tmp[i] == '\n') 
     457        if(fuzz->tmp[i++] == '\n') 
    458458            break; 
    459459    } 
Note: See TracChangeset for help on using the changeset viewer.