From d9967c2638052730c6eeb1624586d633d6482003 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Sat, 27 Apr 2024 19:54:23 +0000 Subject: Avoid ctype abuse. fix https://github.com/ledger/ledger/issues/2338 fix https://github.com/ledger/ledger/issues/2340 --- src/item.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/item.cc') diff --git a/src/item.cc b/src/item.cc index c5db3cad..052d70eb 100644 --- a/src/item.cc +++ b/src/item.cc @@ -157,7 +157,8 @@ void item_t::parse_tags(const char * p, if (! std::strchr(p, ':')) { if (const char * b = std::strchr(p, '[')) { if (*(b + 1) != '\0' && - (std::isdigit(*(b + 1)) || *(b + 1) == '=')) { + (std::isdigit(static_cast(*(b + 1))) || + *(b + 1) == '=')) { if (const char * e = std::strchr(b, ']')) { char buf[256]; std::strncpy(buf, b + 1, static_cast(e - b - 1)); -- cgit v1.2.3