mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 17:59:46 +02:00
Allow far pointer to near pointer truncations to display as cast
This commit is contained in:
parent
4edff2b9f0
commit
5944383088
1 changed files with 8 additions and 2 deletions
|
@ -269,8 +269,14 @@ bool CastStrategyC::isSubpieceCast(Datatype *outtype,Datatype *intype,uint4 offs
|
|||
(outmeta!=TYPE_PTR)&&
|
||||
(outmeta!=TYPE_FLOAT))
|
||||
return false;
|
||||
if ((inmeta==TYPE_PTR)&&((outmeta!=TYPE_INT) && (outmeta!=TYPE_UINT)))
|
||||
return false; //other casts don't make sense for pointers
|
||||
if (inmeta==TYPE_PTR) {
|
||||
if (outmeta == TYPE_PTR) {
|
||||
if (outtype->getSize() < intype->getSize())
|
||||
return true; // Cast from far pointer to near pointer
|
||||
}
|
||||
if ((outmeta!=TYPE_INT) && (outmeta!=TYPE_UINT))
|
||||
return false; //other casts don't make sense for pointers
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue