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/xact.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/xact.cc') diff --git a/src/xact.cc b/src/xact.cc index a0e5b8b4..0a080901 100644 --- a/src/xact.cc +++ b/src/xact.cc @@ -116,8 +116,10 @@ value_t xact_base_t::magnitude() const namespace { inline bool account_ends_with_special_char(const string& name) { string::size_type len(name.length()); - return (std::isdigit(name[len - 1]) || name[len - 1] == ')' || - name[len - 1] == '}' || name[len - 1] == ']'); + return (std::isdigit(static_cast(name[len - 1])) || + name[len - 1] == ')' || + name[len - 1] == '}' || + name[len - 1] == ']'); } struct add_balancing_post -- cgit v1.2.3