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/option.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/option.cc') diff --git a/src/option.cc b/src/option.cc index 43dd853c..44b135e6 100644 --- a/src/option.cc +++ b/src/option.cc @@ -132,7 +132,8 @@ void process_environment(const char ** envp, const string& tag, if (*q == '_') *r++ = '-'; else - *r++ = static_cast(std::tolower(*q)); + *r++ = static_cast(std::tolower( + static_cast(*q))); *r = '\0'; if (*q == '=') { -- cgit v1.2.3