diff options
author | jbzdarkid <jbzdarkid@gmail.com> | 2018-11-07 08:41:20 -0800 |
---|---|---|
committer | jbzdarkid <jbzdarkid@gmail.com> | 2018-11-07 08:41:20 -0800 |
commit | e762e48d6fbab7bd5137c369fa49df25ccd5369d (patch) | |
tree | ef457564aff53d1880531c3f24d7da301988b2d8 /Source/Memory.cpp | |
parent | 1cad9871174728c15abbdb71ee5cbe2cf03ccf0c (diff) | |
download | witness-tutorializer-e762e48d6fbab7bd5137c369fa49df25ccd5369d.tar.gz witness-tutorializer-e762e48d6fbab7bd5137c369fa49df25ccd5369d.tar.bz2 witness-tutorializer-e762e48d6fbab7bd5137c369fa49df25ccd5369d.zip |
Warnings clean because fml
Diffstat (limited to 'Source/Memory.cpp')
-rw-r--r-- | Source/Memory.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Memory.cpp b/Source/Memory.cpp index 168b4e2..0afeded 100644 --- a/Source/Memory.cpp +++ b/Source/Memory.cpp | |||
@@ -25,7 +25,7 @@ Memory::Memory(const std::string& processName) { | |||
25 | // Next, get the process base address | 25 | // Next, get the process base address |
26 | DWORD numModules; | 26 | DWORD numModules; |
27 | std::vector<HMODULE> moduleList(1024); | 27 | std::vector<HMODULE> moduleList(1024); |
28 | EnumProcessModulesEx(_handle, &moduleList[0], moduleList.size(), &numModules, 3); | 28 | EnumProcessModulesEx(_handle, &moduleList[0], static_cast<DWORD>(moduleList.size()), &numModules, 3); |
29 | 29 | ||
30 | std::string name(64, 0); | 30 | std::string name(64, 0); |
31 | for (DWORD i = 0; i < numModules / sizeof(HMODULE); i++) { | 31 | for (DWORD i = 0; i < numModules / sizeof(HMODULE); i++) { |
@@ -49,7 +49,7 @@ Memory::~Memory() { | |||
49 | 49 | ||
50 | void Memory::ThrowError() { | 50 | void Memory::ThrowError() { |
51 | std::string message(256, '\0'); | 51 | std::string message(256, '\0'); |
52 | FormatMessageA(4096, nullptr, GetLastError(), 1024, &message[0], message.length(), nullptr); | 52 | FormatMessageA(4096, nullptr, GetLastError(), 1024, &message[0], static_cast<DWORD>(message.length()), nullptr); |
53 | std::cout << message.c_str() << std::endl; | 53 | std::cout << message.c_str() << std::endl; |
54 | exit(EXIT_FAILURE); | 54 | exit(EXIT_FAILURE); |
55 | } | 55 | } |