summaryrefslogtreecommitdiff
path: root/core/fxcrt/css
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/css')
-rw-r--r--core/fxcrt/css/cfx_cssselector.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fxcrt/css/cfx_cssselector.cpp b/core/fxcrt/css/cfx_cssselector.cpp
index 76cb846890..8a22b12287 100644
--- a/core/fxcrt/css/cfx_cssselector.cpp
+++ b/core/fxcrt/css/cfx_cssselector.cpp
@@ -16,9 +16,9 @@ namespace {
int32_t GetCSSNameLen(const wchar_t* psz, const wchar_t* pEnd) {
const wchar_t* pStart = psz;
while (psz < pEnd) {
- wchar_t wch = *psz;
- if (!FXSYS_iswASCIIalnum(wch) && wch != '_' && wch != '-')
+ if (!isascii(*psz) || (!isalnum(*psz) && *psz != '_' && *psz != '-')) {
break;
+ }
++psz;
}
return psz - pStart;