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