denver
Joined: 14 Apr 2004 Posts: 3 Location: Granada, Spain
|
Posted: Wed Apr 14, 2004 4:37 am Post subject: ps2lib bug fioGets |
|
|
The next code avalaible at ps2lib 2.1:
| Code: | case '\n':
fioLseek(fd, i-read, SEEK_CUR);
i++;
buff[i]=0; // terminate after newline
return i;
............. |
should be:
| Code: | case '\n':
fioLseek(fd, (i+1)-read, SEEK_CUR);
buff[i]=0;
return i;
.............. |
where the main change is that fioLseek doesn't read again the character \n and thus the function does not remain reading eternally :roll: |
|