aboutsummaryrefslogtreecommitdiff
path: root/format.c
diff options
context:
space:
mode:
Diffstat (limited to 'format.c')
-rw-r--r--format.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/format.c b/format.c
index 5f57c72e..1143ced3 100644
--- a/format.c
+++ b/format.c
@@ -251,10 +251,11 @@ format_expand(struct format_tree *ft, const char *fmt)
continue;
}
}
- while (len - off < 2) {
+ while (len - off < 3) {
buf = xrealloc(buf, 2, len);
len *= 2;
}
+ buf[off++] = '#';
buf[off++] = ch;
continue;
}