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; } } 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); }