mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Const comparison fix for nullptr
This commit is contained in:
parent
06a073d0e7
commit
357c0e2e5a
1 changed files with 5 additions and 0 deletions
|
@ -177,6 +177,11 @@ USING_NS_BF;
|
|||
{ \
|
||||
return GetUndefConstValue(MapType(mModule->GetPrimitiveType(BfTypeCode_Boolean))); \
|
||||
} \
|
||||
if ((constLHS->mTypeCode == BfTypeCode_NullPtr) || (constRHS->mTypeCode == BfTypeCode_NullPtr)) \
|
||||
{ \
|
||||
bool val = constLHS->mTypeCode OP constRHS->mTypeCode; \
|
||||
return CreateConst(BfTypeCode_Boolean, val ? (uint64)1 : (uint64)0); \
|
||||
} \
|
||||
if ((constLHS->mTypeCode < BfTypeCode_Length) && (constRHS->mTypeCode < BfTypeCode_Length)) \
|
||||
{ \
|
||||
BF_ASSERT(constLHS->mTypeCode == constRHS->mTypeCode); \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue