aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extract.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/extract.c b/extract.c
index d6214f70..a6492716 100644
--- a/extract.c
+++ b/extract.c
@@ -69,7 +69,7 @@ extract_finish(struct extraction_context *ctx, char **text, size_t *len)
/* Selection of empty cells only */
if (!ensure_size(ctx, 1))
goto out;
- ctx->buf[ctx->idx] = L'\0';
+ ctx->buf[ctx->idx++] = L'\0';
} else {
assert(ctx->idx > 0);
assert(ctx->idx <= ctx->size);
@@ -78,7 +78,7 @@ extract_finish(struct extraction_context *ctx, char **text, size_t *len)
else {
if (!ensure_size(ctx, 1))
goto out;
- ctx->buf[ctx->idx] = L'\0';
+ ctx->buf[ctx->idx++] = L'\0';
}
}