From d7507013e04a003a7b318eedee651cf8a37afb1c Mon Sep 17 00:00:00 2001 From: 0017031 <0017031@users.noreply.github.com> Date: Wed, 28 Nov 2018 11:31:56 +0800 Subject: [PATCH] Enhance pluginsAdmin.h use _TCHAR and _istdigit() to avoid wchar/char mismatch, and possible undefined behavior. https://en.cppreference.com/w/cpp/string/byte/isdigit Close #5067 --- PowerEditor/src/WinControls/PluginsAdmin/pluginsAdmin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PowerEditor/src/WinControls/PluginsAdmin/pluginsAdmin.h b/PowerEditor/src/WinControls/PluginsAdmin/pluginsAdmin.h index d7cab2a0..7651cd62 100644 --- a/PowerEditor/src/WinControls/PluginsAdmin/pluginsAdmin.h +++ b/PowerEditor/src/WinControls/PluginsAdmin/pluginsAdmin.h @@ -51,7 +51,7 @@ struct Version generic_string toString(); bool isNumber(const generic_string& s) const { return !s.empty() && - find_if(s.begin(), s.end(), [](char c) { return !isdigit(c); }) == s.end(); + find_if(s.begin(), s.end(), [](_TCHAR c) { return !_istdigit(c); }) == s.end(); }; int compareTo(const Version& v2c) const;