Skip to content

Commit

Permalink
Fix #549 - dmm cannot read property path from undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Feb 1, 2024
1 parent 7ce5a50 commit ef6ee76
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/agent/lib/debug/memory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,10 @@ function _squashRanges(ranges: any): RangeDetails[] {
let storedRangeProtection = rwxint(firstRange.protection);
let storedRangeFile: FileMapping = firstRange.file;
for (const range of ranges) {
const shouldSquash = range.file && range.file.path === storedRangeFile.path;
let shouldSquash = false;
if (range.file && storedRangeFile) {
shouldSquash = range.file.path === storedRangeFile.path;
}
if (shouldSquash) {
storedRangeProtection |= rwxint(range.protection);
} else {
Expand Down

0 comments on commit ef6ee76

Please sign in to comment.