attempt to fix pb on 32bits systems

This commit is contained in:
csoler 2018-12-08 21:43:14 +01:00
parent a0b6962bec
commit 7c248dc035
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C

View File

@ -178,7 +178,7 @@ bool RsGxsForumModel::convertRefPointerToTabEntry(void *ref,uint32_t& entry)
{
intptr_t val = (intptr_t)ref;
if(val > (intptr_t)(~(uint32_t(0)))) // make sure the pointer is an int that fits in 32bits
if(val > (1<<30)) // make sure the pointer is an int that fits in 32bits and not too big which would look suspicious
{
std::cerr << "(EE) trying to make a ForumModelIndex out of a number that is larger than 2^32-1 !" << std::endl;
return false ;