* fhandler.cc (fhandler_base::puts_readahead): Change
while condition to disallow wild runs.
This commit is contained in:
parent
f26e3f1574
commit
7a87f0326b
@ -1,3 +1,8 @@
|
||||
Thu May 9 23:53:00 2000 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler.cc (fhandler_base::puts_readahead): Change
|
||||
while condition to disallow wild runs.
|
||||
|
||||
Thu May 9 15:24:00 2000 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
Patch suggested by <lha@stacken.kth.se>
|
||||
|
@ -22,8 +22,8 @@ int
|
||||
fhandler_base::puts_readahead (const char *s, size_t len = (size_t) -1)
|
||||
{
|
||||
int success = 1;
|
||||
while ((((len == (size_t) -1) && *s) || len--) &&
|
||||
(success = put_readahead (*s++) > 0))
|
||||
while ((*s || (len != (size_t) -1 && len--))
|
||||
&& (success = put_readahead (*s++) > 0))
|
||||
continue;
|
||||
return success;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user