Unverified Commit de9bae21 authored by Oran Agra's avatar Oran Agra Committed by GitHub
Browse files

Fix bug in sdscatfmt when % is the last format char (#9173)



For the sdscatfmt function in sds.c, when the parameter fmt ended up with '%',
the behavior is undefined. This commit fix this bug.
Co-authored-by: default avatarstafuc <stafuc@gmail.com>
parent 16e04ed9
......@@ -682,6 +682,7 @@ sds sdscatfmt(sds s, char const *fmt, ...) {
switch(*f) {
case '%':
next = *(f+1);
if (next == '\0') break;
f++;
switch(next) {
case 's':
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment