Branch: Tag:

1997-05-03

1997-05-03 12:10:30 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

bug in gets() fixed

Rev: lib/modules/Stdio.pmod:1.4

42:    /* 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);