head 1.1; access; symbols; locks; strict; comment @// @; 1.1 date 2026.04.27.10.52.42; author wiz; state Exp; branches; next ; commitid Y4tcyfln8KQVpADG; desc @@ 1.1 log @librime: fix ctype(3) abuse Bump PKGREVISION. @ text @$NetBSD$ Fix ctype(3) API abuse. --- src/rime/config/config_data.cc.orig 2026-04-27 10:48:42.262818340 +0000 +++ src/rime/config/config_data.cc @@@@ -96,7 +96,7 @@@@ bool ConfigData::IsListItemReference(const string& key } bool ConfigData::IsListItemReference(const string& key) { - return key.length() > 1 && key[0] == '@@' && std::isalnum(key[1]); + return key.length() > 1 && key[0] == '@@' && std::isalnum((unsigned char)key[1]); } string ConfigData::FormatListIndex(size_t index) { @@@@ -293,7 +293,7 @@@@ void EmitScalar(const string& str_value, YAML::Emitter if (str_value.find_first_of("\r\n") != string::npos) { *emitter << YAML::Literal; } else if (!std::all_of(str_value.cbegin(), str_value.cend(), [](auto ch) { - return std::isalnum(ch) || ch == '_' || ch == '.'; + return std::isalnum((unsigned char)ch) || ch == '_' || ch == '.'; })) { *emitter << YAML::DoubleQuoted; } @