diff --git a/hiredis.h b/hiredis.h index 423d5e5..77d5797 100644 --- a/hiredis.h +++ b/hiredis.h @@ -99,7 +99,7 @@ * need to copy the result into our private buffer. */ \ if (err_str != (buf)) { \ strncpy((buf), err_str, ((len) - 1)); \ - buf[(len)-1] = '\0'; \ + (buf)[(len)-1] = '\0'; \ } \ } while (0) #endif