From 1b4d27a3badddd2648c3f02cd234ca74c5a40e6b Mon Sep 17 00:00:00 2001 From: Christian Lohmaier Date: Sat, 11 Jul 2015 02:03:01 +0200 Subject: 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 Tested-by: Jenkins --- jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'jvmfwk') diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx index a19b26a18c61..c7a273c82ae9 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx @@ -588,7 +588,7 @@ static void do_msvcr_magic(rtl_uString *jvm_dll) if (sections->VirtualAddress <= importsVA && importsVA < sections->VirtualAddress + sections->SizeOfRawData) { - VAtoPhys = sections->PointerToRawData - sections->VirtualAddress; + VAtoPhys = static_cast(sections->PointerToRawData) - static_cast(sections->VirtualAddress); break; } ++sections; -- cgit v1.2.3