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
This commit is contained in:
parent
b4f012985f
commit
d7507013e0
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user