tdf#92483 fix initializing JRE on Win 64bit (load java's msvcr100.dll)

problem is that the offsets/sizes are of different type than ptrdiff_t,
and when using without casting, the resulting address is way off...

Change-Id: I7b1cdd611c8c4b317cd33ca8fbbda2e7e8f5f4fc
Reviewed-on: https://gerrit.libreoffice.org/16938
Reviewed-by: David Ostrovsky <david@ostrovsky.org>
Tested-by: Jenkins <ci@libreoffice.org>
This commit is contained in:
Christian Lohmaier
2015-07-11 02:03:01 +02:00
parent 2385754243
commit 1b4d27a3ba

View File

@@ -588,7 +588,7 @@ static void do_msvcr_magic(rtl_uString *jvm_dll)
if (sections->VirtualAddress <= importsVA && if (sections->VirtualAddress <= importsVA &&
importsVA < sections->VirtualAddress + sections->SizeOfRawData) importsVA < sections->VirtualAddress + sections->SizeOfRawData)
{ {
VAtoPhys = sections->PointerToRawData - sections->VirtualAddress; VAtoPhys = static_cast<size_t>(sections->PointerToRawData) - static_cast<size_t>(sections->VirtualAddress);
break; break;
} }
++sections; ++sections;