summaryrefslogtreecommitdiff
path: root/src/string.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-04-24 07:31:58 +0000
committerrubidium <rubidium@openttd.org>2010-04-24 07:31:58 +0000
commit8aad995e32bfdfd31cbd811f65c5c986f2b9be70 (patch)
treea81e1864e1e2edd8acc29013d7fddace8e53bd0f /src/string.cpp
parentcdfd81405e76b0a35feb2ca1512628fcc3569a93 (diff)
downloadopenttd-8aad995e32bfdfd31cbd811f65c5c986f2b9be70.tar.xz
(svn r19703) -Add: hexadecimal string filter
Diffstat (limited to 'src/string.cpp')
-rw-r--r--src/string.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/string.cpp b/src/string.cpp
index 16e1e7099..58ac00a6c 100644
--- a/src/string.cpp
+++ b/src/string.cpp
@@ -202,6 +202,7 @@ bool IsValidChar(WChar key, CharSetFilter afilter)
case CS_NUMERAL: return (key >= '0' && key <= '9');
case CS_NUMERAL_SPACE: return (key >= '0' && key <= '9') || key == ' ';
case CS_ALPHA: return IsPrintable(key) && !(key >= '0' && key <= '9');
+ case CS_HEXADECIMAL: return (key >= '0' && key <= '9') || (key >= 'a' && key <= 'f') || (key >= 'A' && key <= 'F');
}
return false;