aboutsummaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp.c b/pp.c
index 7f6b737..5b9258b 100644
--- a/pp.c
+++ b/pp.c
@@ -403,7 +403,7 @@ stringize(struct array *buf, struct token *t)
{
const char *lit;
- if ((t->space || t->kind == TNEWLINE) && ((char *)buf->val)[buf->len - 1] != ' ')
+ if ((t->space || t->kind == TNEWLINE) && buf->len > 1 && ((char *)buf->val)[buf->len - 1] != ' ')
arrayaddbuf(buf, " ", 1);
lit = t->lit ? t->lit : tokstr[t->kind];
if (t->kind == TSTRINGLIT || t->kind == TCHARCONST) {