summaryrefslogtreecommitdiff
path: root/hiredis.h
diff options
context:
space:
mode:
Diffstat (limited to 'hiredis.h')
-rw-r--r--hiredis.h2
1 files changed, 1 insertions, 1 deletions
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