mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 02:39:44 +02:00
GP-3292 Fix initializeForReading in case where there is only 1 value
This commit is contained in:
parent
ca9a56b5f4
commit
e02c600234
2 changed files with 9 additions and 4 deletions
|
@ -341,9 +341,14 @@ bool JumpValuesRangeDefault::contains(uintb val) const
|
|||
bool JumpValuesRangeDefault::initializeForReading(void) const
|
||||
|
||||
{
|
||||
if (range.getSize()==0) return false;
|
||||
curval = range.getMin();
|
||||
lastvalue = false;
|
||||
if (range.getSize()==0) {
|
||||
curval = extravalue;
|
||||
lastvalue = true;
|
||||
}
|
||||
else {
|
||||
curval = range.getMin();
|
||||
lastvalue = false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -217,7 +217,7 @@ class JumpValuesRangeDefault : public JumpValuesRange {
|
|||
uintb extravalue; ///< The extra value
|
||||
Varnode *extravn; ///< The starting Varnode associated with the extra value
|
||||
PcodeOp *extraop; ///< The starting PcodeOp associated with the extra value
|
||||
mutable bool lastvalue; ///< \b true is the extra value has been visited by the iterator
|
||||
mutable bool lastvalue; ///< \b true if the extra value has been visited by the iterator
|
||||
public:
|
||||
void setExtraValue(uintb val) { extravalue = val; } ///< Set the extra value explicitly
|
||||
void setDefaultVn(Varnode *vn) { extravn = vn; } ///< Set the associated start Varnode
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue