* fhandler.cc (fhandler_base::puts_readahead): Change

while condition to disallow wild runs.
This commit is contained in:
Corinna Vinschen
2000-05-09 21:55:11 +00:00
parent f26e3f1574
commit 7a87f0326b
2 changed files with 7 additions and 2 deletions

View File

@@ -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;
}