summaryrefslogtreecommitdiffstats
path: root/RichString.h
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2015-08-20 00:31:48 -0300
committerHisham Muhammad <hisham@gobolinux.org>2015-08-20 00:31:48 -0300
commit8bd603cb68fb5dd768b5b23ffe0c6f09f5340ceb (patch)
treefe5506bbbd80dca2b318e7d89c51218f31d880a4 /RichString.h
parent78be8201dc86c4d57226d845f04ac496cd64d9b6 (diff)
Make Unicode strings safe for ncurses 6 ABI.
Closes #241.
Diffstat (limited to 'RichString.h')
-rw-r--r--RichString.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/RichString.h b/RichString.h
index 971e3acb..3179bb97 100644
--- a/RichString.h
+++ b/RichString.h
@@ -30,8 +30,8 @@ in the source distribution for its full text.
#define RichString_size(this) ((this)->chlen)
#define RichString_sizeVal(this) ((this).chlen)
-#define RichString_begin(this) RichString (this); (this).chlen = 0; (this).chptr = (this).chstr;
-#define RichString_beginAllocated(this) (this).chlen = 0; (this).chptr = (this).chstr;
+#define RichString_begin(this) RichString (this); memset(&this, 0, sizeof(RichString)); (this).chptr = (this).chstr;
+#define RichString_beginAllocated(this) memset(&this, 0, sizeof(RichString)); (this).chptr = (this).chstr;
#define RichString_end(this) RichString_prune(&(this));
#ifdef HAVE_LIBNCURSESW

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