Dolda2000 GitWeb
/
ashd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
407963f
)
lib: Fixed bioprintf bug.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 30 Oct 2016 20:08:26 +0000
(21:08 +0100)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 30 Oct 2016 20:08:32 +0000
(21:08 +0100)
lib/bufio.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/bufio.c
b/lib/bufio.c
index
c08e9dd
..
11d8c04
100644
(file)
--- a/
lib/bufio.c
+++ b/
lib/bufio.c
@@
-289,11
+289,11
@@
int bioprintf(struct bufio *bio, const char *format, ...)
va_start(args, format);
ret = vsnprintf(bio->wbuf.b + bio->wbuf.d, bio->wbuf.s - bio->wbuf.d, format, args);
va_end(args);
- if(ret <
=
bio->wbuf.s - bio->wbuf.d) {
+ if(ret < bio->wbuf.s - bio->wbuf.d) {
bio->wbuf.d += ret;
return(0);
}
- if(biowensure(bio, ret) < 0)
+ if(biowensure(bio, ret
+ 1
) < 0)
return(-1);
}
}