summaryrefslogtreecommitdiff
path: root/src/textbuf.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2013-03-17 13:04:48 +0000
committerfrosch <frosch@openttd.org>2013-03-17 13:04:48 +0000
commit19b18d782247690048420a55a2ec37127c02feb8 (patch)
tree079d8c02ec4c77150d971cbc5eb4140e2774aa5b /src/textbuf.cpp
parent579ee7a59230db6d1caac8e653d27ccc6e454e2e (diff)
downloadopenttd-19b18d782247690048420a55a2ec37127c02feb8.tar.xz
(svn r25090) -Fix: Make editbox character filters also apply to pasted content from clipboard.
Diffstat (limited to 'src/textbuf.cpp')
-rw-r--r--src/textbuf.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/textbuf.cpp b/src/textbuf.cpp
index 457388db7..f38bfd17b 100644
--- a/src/textbuf.cpp
+++ b/src/textbuf.cpp
@@ -190,7 +190,7 @@ bool Textbuf::InsertClipboard()
uint16 pixels = 0, bytes = 0, chars = 0;
WChar c;
for (const char *ptr = utf8_buf; (c = Utf8Consume(&ptr)) != '\0';) {
- if (!IsPrintable(c)) break;
+ if (!IsValidChar(c, this->afilter)) break;
byte len = Utf8CharLen(c);
if (this->bytes + bytes + len > this->max_bytes) break;