summaryrefslogtreecommitdiff
path: root/src/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 26dfb8e..a89c82e 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -133,7 +133,7 @@ void cmark_strbuf_sets(cmark_strbuf *buf, const char *string) {
void cmark_strbuf_putc(cmark_strbuf *buf, int c) {
S_strbuf_grow_by(buf, 1);
- buf->ptr[buf->size++] = c;
+ buf->ptr[buf->size++] = (unsigned char)(c & 0xFF);
buf->ptr[buf->size] = '\0';
}