diff --git a/hiredis.c b/hiredis.c index c0968ed..a3b3edd 100644 --- a/hiredis.c +++ b/hiredis.c @@ -485,6 +485,8 @@ int redisvFormatCommand(char **target, const char *format, va_list ap) { touched = 1; c++; + if (*c == '\0') + break; } c++; }