mirror of
https://github.com/NohamR/Reclass.git
synced 2026-05-10 19:59:21 +00:00
fix: narrow inline editor selection for pointer values, resolve correct write address
resolvedSpanFor() now applies narrowPtrValueSpan() to trim the "// Module+offset" symbol comment from the editable span, matching hitTestTarget(). Previously the full value column text was selected, making the parser fail on commit (toULongLong rejected the non-hex suffix), so pointer value saves were silently no-ops. With the parse now succeeding, a second bug was exposed: setNodeValue() computed write addresses via computeOffset() which sums tree offsets without dereferencing pointers. For nodes inside expanded pointer targets (e.g. VTable entries), this wrote to struct_base+child_offset instead of *ptr_value+child_offset, causing an access violation crash. The fix passes lm->offsetAddr (the compose-resolved absolute address) through the inlineEditCommitted signal so setNodeValue() uses the correct dereferenced address.
This commit is contained in:
@@ -92,7 +92,8 @@ public:
|
||||
void removeNode(int nodeIdx);
|
||||
void toggleCollapse(int nodeIdx);
|
||||
void materializeRefChildren(int nodeIdx);
|
||||
void setNodeValue(int nodeIdx, int subLine, const QString& text, bool isAscii = false);
|
||||
void setNodeValue(int nodeIdx, int subLine, const QString& text,
|
||||
bool isAscii = false, uint64_t resolvedAddr = 0);
|
||||
void duplicateNode(int nodeIdx);
|
||||
void convertToTypedPointer(uint64_t nodeId);
|
||||
void splitHexNode(uint64_t nodeId);
|
||||
|
||||
Reference in New Issue
Block a user