diff options
author | truelight <truelight@openttd.org> | 2006-08-19 09:31:22 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2006-08-19 09:31:22 +0000 |
commit | 83d56d6d798a28169f00a4c67323a407037c0b0a (patch) | |
tree | 99ae4703fae7e532aba0086cf644ec2230755e2e /win32.c | |
parent | ee0daa0a4fdbafba224f48d7749ba13b79fa3fdc (diff) | |
download | openttd-83d56d6d798a28169f00a4c67323a407037c0b0a.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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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++; |