summaryrefslogtreecommitdiff
path: root/rsc/source/tools
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2015-04-19 22:28:56 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2015-04-20 05:26:05 +0000
commitfc0d494b8936ab11abca761810de8a03f579edf5 (patch)
tree994c79d2a6565d1dc5084ac5e64f3f5d828a6aa3 /rsc/source/tools
parentd68cf40b7a16e20e99c15d310b24c91c2ca89ef6 (diff)
rsc crash on WIN64 due to LP64
rsc stash stuff in a 'value' filed that was defined as 'long' saddly it stash also pointer there... which on WIN64 truncate 64 bits pointers in 32 bits scalar. That went unnoticed for years because on every other platform sizeof(long) = sizeof(void*) Change-Id: I218ae181c9d6b64ade457ee49942d1d07a933bb7 Reviewed-on: https://gerrit.libreoffice.org/15394 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'rsc/source/tools')
-rw-r--r--rsc/source/tools/rsctree.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/rsc/source/tools/rsctree.cxx b/rsc/source/tools/rsctree.cxx
index c72c77f8d5e6..a080349cf80d 100644
--- a/rsc/source/tools/rsctree.cxx
+++ b/rsc/source/tools/rsctree.cxx
@@ -155,9 +155,9 @@ NameNode * NameNode::Remove( NameNode * pRemove )
COMPARE NameNode::Compare( const NameNode * pCompare ) const
{
- if( reinterpret_cast<long>(this) < reinterpret_cast<long>(pCompare) )
+ if( reinterpret_cast<sal_uIntPtr>(this) < reinterpret_cast<sal_uIntPtr>(pCompare) )
return LESS;
- else if( reinterpret_cast<long>(this) > reinterpret_cast<long>(pCompare) )
+ else if( reinterpret_cast<sal_uIntPtr>(this) > reinterpret_cast<sal_uIntPtr>(pCompare) )
return GREATER;
else
return EQUAL;
@@ -165,9 +165,9 @@ COMPARE NameNode::Compare( const NameNode * pCompare ) const
COMPARE NameNode::Compare( const void * pCompare ) const
{
- if( reinterpret_cast<long>(this) < reinterpret_cast<long>(pCompare) )
+ if( reinterpret_cast<sal_uIntPtr>(this) < reinterpret_cast<sal_uIntPtr>(pCompare) )
return LESS;
- else if( reinterpret_cast<long>(this) > reinterpret_cast<long>(pCompare) )
+ else if( reinterpret_cast<sal_uIntPtr>(this) > reinterpret_cast<sal_uIntPtr>(pCompare) )
return GREATER;
else
return EQUAL;