4
0
mirror of https://github.com/QuasarApp/pe-parse.git synced 2025-04-29 13:54:33 +00:00

MSVC: Fix compilation warning caused by ::toupper ()

This commit is contained in:
Alessandro Gario 2018-03-26 13:40:48 +02:00 committed by GitHub
parent 752f526e2e
commit 50ca8192e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1185,8 +1185,18 @@ bool getImports(parsed_pe *p) {
if (!readCString(*nameSec.sectionData, nameOff, modName)) { if (!readCString(*nameSec.sectionData, nameOff, modName)) {
return false; return false;
} }
// clang-format off
std::transform( std::transform(
modName.begin(), modName.end(), modName.begin(), ::toupper); modName.begin(),
modName.end(),
modName.begin(),
[](char chr) -> char {
return static_cast<char>(::toupper(chr));
}
);
// clang-format on
// then, try and get all of the sub-symbols // then, try and get all of the sub-symbols
VA lookupVA = 0; VA lookupVA = 0;