summaryrefslogtreecommitdiff
path: root/win32.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2006-08-19 09:31:22 +0000
committertruelight <truelight@openttd.org>2006-08-19 09:31:22 +0000
commitd3f2180438830f8fefc1e319276d33a914fee767 (patch)
tree99ae4703fae7e532aba0086cf644ec2230755e2e /win32.c
parent9b18c11413655ef3bc1871cf84fe1a0e95a166c3 (diff)
downloadopenttd-d3f2180438830f8fefc1e319276d33a914fee767.tar.xz
(svn r5944) -Merge TGP (r5578, r5579, r5724, r5726): -Feature: filter for textboxes to only
allow certain patterns (like numbers only)
Diffstat (limited to 'win32.c')
-rw-r--r--win32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/win32.c b/win32.c
index 9f1cb6c15..eea7646b3 100644
--- a/win32.c
+++ b/win32.c
@@ -956,7 +956,7 @@ bool InsertTextBufferClipboard(Textbuf *tb)
data = GlobalLock(cbuf); // clipboard data
dataptr = data;
- for (; IsValidAsciiChar(*dataptr) && (tb->length + length) < (tb->maxlength - 1) &&
+ for (; IsValidAsciiChar(*dataptr, CS_ALPHANUMERAL) && (tb->length + length) < (tb->maxlength - 1) &&
(tb->maxwidth == 0 || width + tb->width + GetCharacterWidth(FS_NORMAL, (byte)*dataptr) <= tb->maxwidth); dataptr++) {
width += GetCharacterWidth(FS_NORMAL, (byte)*dataptr);
length++;