From dea9c19da4761f40a3800c402b8740180598002e Mon Sep 17 00:00:00 2001 From: Rafael Villalobos <41552468+rvillalob@users.noreply.github.com> Date: Mon, 24 Sep 2018 08:52:17 -0700 Subject: [PATCH 1/2] Update utf8.c The function unicode_to_utf8 was failing to produce the correct leading byte of the UTF8 sequence because the loop was stopping one iteration too soon. --- utf8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utf8.c b/utf8.c index 3bffd1e..a52d3c9 100644 --- a/utf8.c +++ b/utf8.c @@ -90,7 +90,7 @@ unsigned unicode_to_utf8(unsigned int c, char *utf8) bytes++; prefix >>= 1; c >>= 6; - } while (c > prefix); + } while (c >= prefix); *p = c - 2*prefix; reverse_string(utf8, p); } From 0d950cac5df7fc995decf185088b6b736da325fe Mon Sep 17 00:00:00 2001 From: Rafael Villalobos <41552468+rvillalob@users.noreply.github.com> Date: Sun, 30 Sep 2018 15:59:08 -0700 Subject: [PATCH 2/2] Update line.c If the current kill buffer chunk was just assigned NULL, shouldn't kused be assigned a value of zero? --- line.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/line.c b/line.c index 172c9cd..041819e 100644 --- a/line.c +++ b/line.c @@ -613,7 +613,7 @@ void kdelete(void) /* and reset all the kill buffer pointers */ kbufh = kbufp = NULL; - kused = KBLOCK; + kused = 0; } }