From 9743b0efc576d676141316aaa6e02abbd746804d Mon Sep 17 00:00:00 2001 From: jp9000 Date: Thu, 12 Dec 2013 21:46:29 -0700 Subject: [PATCH] fixed a lexer bug with detecting alphanumeric character text (not happy about it though) --- libobs/util/lexer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libobs/util/lexer.c b/libobs/util/lexer.c index d15424657..1f18014d2 100644 --- a/libobs/util/lexer.c +++ b/libobs/util/lexer.c @@ -241,9 +241,9 @@ static inline enum base_token_type get_char_token_type(const char ch) { if (is_whitespace(ch)) return BASETOKEN_WHITESPACE; - else if (isdigit(ch)) + else if (ch >= '0' && ch <= '9') return BASETOKEN_DIGIT; - else if (isalpha(ch)) + else if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) return BASETOKEN_ALPHA; return BASETOKEN_OTHER;