diff options
Diffstat (limited to 'utf8.c')
-rw-r--r-- | utf8.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -382,6 +382,9 @@ void strbuf_utf8_replace(struct strbuf *sb_src, int pos, int width, dst += n; } + if (src >= end) + break; + old = src; n = utf8_width((const char**)&src, NULL); if (!src) /* broken utf-8, do nothing */ |