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/report.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/report.cc') diff --git a/src/report.cc b/src/report.cc index d632a0d2..cf71a895 100644 --- a/src/report.cc +++ b/src/report.cc @@ -642,10 +642,10 @@ value_t report_t::fn_trim(call_scope_t& args) const char * p = buf.get(); const char * e = buf.get() + temp.length() - 1; - while (p <= e && std::isspace(*p)) + while (p <= e && std::isspace(static_cast(*p))) p++; - while (e > p && std::isspace(*e)) + while (e > p && std::isspace(static_cast(*e))) e--; if (p > e) { -- cgit v1.2.3