Skip to content

Commit 4e1c48e

Browse files
committed
Handle non alpha characters
1 parent 5781d7d commit 4e1c48e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libcxx/src/experimental/tzdb.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static void __skip(istream& __input, string_view __suffix) {
9898
}
9999

100100
static void __matches(istream& __input, char __expected) {
101-
_LIBCPP_ASSERT_INTERNAL(std::islower(__expected), "lowercase characters only here!");
101+
_LIBCPP_ASSERT_INTERNAL(!std::isalpha(__expected) || std::islower(__expected), "lowercase characters only here!");
102102
char __c = __input.get();
103103
if (std::tolower(__c) != __expected)
104104
std::__throw_runtime_error(
@@ -107,7 +107,7 @@ static void __matches(istream& __input, char __expected) {
107107

108108
static void __matches(istream& __input, string_view __expected) {
109109
for (auto __c : __expected) {
110-
_LIBCPP_ASSERT_INTERNAL(std::islower(__c), "lowercase strings only here!");
110+
_LIBCPP_ASSERT_INTERNAL(!std::isalpha(__expected) || std::islower(__c), "lowercase strings only here!");
111111
char __actual = __input.get();
112112
if (std::tolower(__actual) != __c)
113113
std::__throw_runtime_error(

0 commit comments

Comments
 (0)