diff --git a/RichString.c b/RichString.c index 5e63038f5..159d08ca0 100644 --- a/RichString.c +++ b/RichString.c @@ -65,7 +65,7 @@ static void RichString_setLen(RichString* this, int len) { } void RichString_rewind(RichString* this, int count) { - RichString_setLen(this, this->chlen - count); + RichString_setLen(this, this->chlen > count ? this->chlen - count : 0); } #ifdef HAVE_LIBNCURSESW