From 5d74917f49bac4dd24282cf8662bb3f06039037b Mon Sep 17 00:00:00 2001 From: Yongyan Liu Date: Wed, 26 Aug 2026 11:10:02 -0400 Subject: [PATCH] [tmva][sofie] Avoid undefined behavior in Clean_name --- tmva/sofie/src/SOFIE_common.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmva/sofie/src/SOFIE_common.cxx b/tmva/sofie/src/SOFIE_common.cxx index 672d77048ef38..22c3ab39ea9e8 100644 --- a/tmva/sofie/src/SOFIE_common.cxx +++ b/tmva/sofie/src/SOFIE_common.cxx @@ -513,7 +513,7 @@ std::string UTILITY::Clean_name(std::string input_tensor_name){ std::string s (input_tensor_name); std::replace( s.begin(), s.end(), '-', '_'); // replace all non-alpohanumeric character except for "_" - s.erase(std::remove_if(s.begin(), s.end(), []( char const& c ) -> bool { return !std::isalnum(c) && c != '_'; } ), s.end()); + s.erase(std::remove_if(s.begin(), s.end(), []( char const& c ) -> bool { return !std::isalnum(static_cast(c)) && c != '_'; } ), s.end()); return s; }