summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2015-07-11 02:03:01 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2015-07-11 17:53:40 +0000
commit14bc2d237813b208a176cacece3a27a32145d3b4 (patch)
tree8d2ec4720e045c5514bb62c54a823432d4716e26
parent607af001ccdbfe40b089942b879e5ce3980bde49 (diff)
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> (cherry picked from commit 1b4d27a3badddd2648c3f02cd234ca74c5a40e6b) Reviewed-on: https://gerrit.libreoffice.org/16950
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index 72e17d30822a..000797528daf 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -591,7 +591,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<size_t>(sections->PointerToRawData) - static_cast<size_t>(sections->VirtualAddress);
break;
}
++sections;