summaryrefslogtreecommitdiff
path: root/src/report.cc
diff options
context:
space:
mode:
authorTaylor R Campbell <campbell+ledger@mumble.net>2024-04-27 19:54:23 +0000
committerJohn Wiegley <johnw@newartisans.com>2024-08-06 14:51:38 -1000
commitd9967c2638052730c6eeb1624586d633d6482003 (patch)
treef6dd9d0a94cc633f4e1a4f0588c2cb613e0100e2 /src/report.cc
parent762353945a744ae4b89970b9e08c2c22a52ddbff (diff)
downloadfork-ledger-d9967c2638052730c6eeb1624586d633d6482003.tar.gz
fork-ledger-d9967c2638052730c6eeb1624586d633d6482003.tar.bz2
fork-ledger-d9967c2638052730c6eeb1624586d633d6482003.zip
Avoid ctype abuse.
fix https://github.com/ledger/ledger/issues/2338 fix https://github.com/ledger/ledger/issues/2340
Diffstat (limited to 'src/report.cc')
-rw-r--r--src/report.cc4
1 files changed, 2 insertions, 2 deletions
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<unsigned char>(*p)))
p++;
- while (e > p && std::isspace(*e))
+ while (e > p && std::isspace(static_cast<unsigned char>(*e)))
e--;
if (p > e) {