summaryrefslogtreecommitdiffstats
path: root/RichString.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2015-08-20 01:13:20 -0300
committerHisham Muhammad <hisham@gobolinux.org>2015-08-20 01:13:20 -0300
commitc9cab824e9154c9b73309e899d9ff7417aaa4349 (patch)
treea8b60e66a7393761f2aa4fd3565657bfde78c3d0 /RichString.c
parent5e4f1e46cc1c26a87f4922812252c409b11fc53c (diff)
Extra checks.
Diffstat (limited to 'RichString.c')
-rw-r--r--RichString.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/RichString.c b/RichString.c
index ad90a0ac..ffed3ee0 100644
--- a/RichString.c
+++ b/RichString.c
@@ -84,7 +84,7 @@ static void RichString_extendLen(RichString* this, int len) {
this->chlen = len;
}
-#define RichString_setLen(this, len) do{ if(len < RICHSTRING_MAXLEN) { RichString_setChar(this,len,0); this->chlen=len; } else RichString_extendLen(this,len); }while(0)
+#define RichString_setLen(this, len) do{ if(len < RICHSTRING_MAXLEN && this->chlen < RICHSTRING_MAXLEN) { RichString_setChar(this,len,0); this->chlen=len; } else RichString_extendLen(this,len); }while(0)
#ifdef HAVE_LIBNCURSESW

© 2014-2024 Faster IT GmbH | imprint | privacy policy