non-printable character filter patch (#504144)
parent
a76835f527
commit
8413399ae9
@ -0,0 +1,11 @@
|
|||||||
|
--- RichString.c.orig 2008-03-09 03:23:49.000000000 +0100
|
||||||
|
+++ RichString.c 2008-11-18 12:30:21.000000000 +0100
|
||||||
|
@@ -89,7 +89,7 @@
|
||||||
|
inline void RichString_appendn(RichString* this, int attrs, char* data_c, int len) {
|
||||||
|
int last = MIN(RICHSTRING_MAXLEN - 1, len + this->len);
|
||||||
|
for (int i = this->len, j = 0; i < last; i++, j++)
|
||||||
|
- this->chstr[i] = data_c[j] | attrs;
|
||||||
|
+ this->chstr[i] = ((data_c[j] > 31) ? data_c[j] : '?' ) | attrs;
|
||||||
|
this->chstr[last] = 0;
|
||||||
|
this->len = last;
|
||||||
|
}
|
Loading…
Reference in new issue