projects
/
runtime.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fixed silc_buffer_unformat return correct length with SILC_STR_ADVANCE
[runtime.git]
/
lib
/
silcutil
/
silcbuffmt.c
diff --git
a/lib/silcutil/silcbuffmt.c
b/lib/silcutil/silcbuffmt.c
index 944841d4f284896fdaccf805126ba8f1319b13a2..838177d183932c0bb5a9fa465d572ca5b1df459c 100644
(file)
--- a/
lib/silcutil/silcbuffmt.c
+++ b/
lib/silcutil/silcbuffmt.c
@@
-1244,11
+1244,12
@@
int silc_buffer_sunformat_vp_i(SilcStack stack, SilcBuffer src, va_list ap,
return -1;
ok:
+ len = src->data - start_ptr;
+
/* Push the buffer back to the start. */
- if (process && !advance) {
- len = src->data - start_ptr;
+ if (process && !advance)
silc_buffer_push(src, len);
- }
+
return len;
}