mirror of
https://github.com/samba-team/samba.git
synced 2025-03-08 04:58:40 +03:00
fixed line buffer mode in XFILE
thanks to tim for finding this bug
This commit is contained in:
parent
06a4a6d30a
commit
91bff75454
@ -171,7 +171,7 @@ int x_fwrite(const void *p, size_t size, size_t nmemb, XFILE *f)
|
||||
flush a bit more than necessary, but that is harmless */
|
||||
if (f->buftype == X_IOLBF && f->bufused) {
|
||||
int i;
|
||||
for (i=size-1; i>=0; i--) {
|
||||
for (i=(size*nmemb)-1; i>=0; i--) {
|
||||
if (*(i+(const char *)p) == '\n') {
|
||||
x_fflush(f);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user