summaryrefslogtreecommitdiff
path: root/show-diff.c
diff options
context:
space:
mode:
Diffstat (limited to 'show-diff.c')
-rw-r--r--show-diff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/show-diff.c b/show-diff.c
index 8a66e59cf5..36afb3cc91 100644
--- a/show-diff.c
+++ b/show-diff.c
@@ -27,8 +27,8 @@ static char *sq_expand(char *src)
int cnt, c;
char *cp;
- /* count single quote characters */
- for (cnt = 0, cp = src; *cp; cnt++, cp++)
+ /* count bytes needed to store the quoted string. */
+ for (cnt = 1, cp = src; *cp; cnt++, cp++)
if (*cp == '\'')
cnt += 3;