Skip to content
Snippets Groups Projects
Commit b6f2fb7e authored by Fredrik Hübinette (Hubbe)'s avatar Fredrik Hübinette (Hubbe)
Browse files

bug in gets() fixed

Rev: lib/modules/Stdio.pmod:1.4
parent 9390db1b
No related branches found
No related tags found
No related merge requests found
......@@ -42,10 +42,10 @@ class FILE {
/* Public functions. */
string gets()
{
int p,tmp=bpos;
while((p=search(b, "\n", tmp)) == -1)
int p,tmp=0;
while((p=search(b, "\n", bpos+tmp)) == -1)
{
tmp=strlen(b);
tmp=strlen(b)-bpos;
if(!get_data()) return 0;
}
return extract(p-bpos, 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment