diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-27 20:21:23 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-27 20:21:23 +0300 |
commit | 97664741d4f4159097bd0a8c0171587f55f5cb1d (patch) | |
tree | fbeebff776e0f83349a043d4aba5ef0e6b7359c9 /tools | |
parent | 65e6ce0845f54efd9b4e1a1d294c6ee9186d2baf (diff) |
checksum: fix for the batch processing mode
Diffstat (limited to 'tools')
-rw-r--r-- | tools/checksum/checksum.cpp | 4 | ||||
-rw-r--r-- | tools/checksum/checksum.exe | bin | 18432 -> 18432 bytes |
2 files changed, 3 insertions, 1 deletions
diff --git a/tools/checksum/checksum.cpp b/tools/checksum/checksum.cpp index 0e19ab1693..aee6b6102f 100644 --- a/tools/checksum/checksum.cpp +++ b/tools/checksum/checksum.cpp @@ -18,7 +18,7 @@ #pragma comment(lib, "version.lib")
int debug = 0;
-DWORD dwVersion = 0;
+DWORD dwVersion;
static void PatchResourcesDirectory(PIMAGE_RESOURCE_DIRECTORY pIRD, PBYTE pBase, DWORD dwType);
@@ -219,6 +219,8 @@ int PEChecksum(wchar_t *filename, BYTE digest[16]) // patch resources
if (resSize > 0 && resAddr >= pISH->VirtualAddress && resAddr + resSize <= pISH->VirtualAddress + pISH->SizeOfRawData) {
+ dwVersion = 0;
+
DWORD shift = resAddr - pISH->VirtualAddress + pISH->PointerToRawData;
IMAGE_RESOURCE_DIRECTORY *pIRD = (IMAGE_RESOURCE_DIRECTORY*)(ptr + shift);
PatchResourcesDirectory(pIRD, ptr + shift, 0);
diff --git a/tools/checksum/checksum.exe b/tools/checksum/checksum.exe Binary files differindex f4e21190c6..9cc85cb66e 100644 --- a/tools/checksum/checksum.exe +++ b/tools/checksum/checksum.exe |