summaryrefslogtreecommitdiff
path: root/src/glibext
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-03-29 21:01:51 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-03-29 21:01:51 (GMT)
commitb8d5a539b1e6837f7395598a3fa25ef69650e885 (patch)
tree2fbf770b1aebf1b66a8ac87e2eeae4521775d092 /src/glibext
parent4f3f96c2c98ac507f4aa7c83e2393c5c1fdd3cdd (diff)
Handled areas which are not allocated in memory.
Diffstat (limited to 'src/glibext')
-rw-r--r--src/glibext/gbufferline.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/glibext/gbufferline.c b/src/glibext/gbufferline.c
index 8c8f4f6..d8ed7ed 100644
--- a/src/glibext/gbufferline.c
+++ b/src/glibext/gbufferline.c
@@ -352,16 +352,23 @@ void g_buffer_line_fill_virt(GBufferLine *line, MemoryDataSize size, const vmpa2
vmpa2_virt_to_string(addr, size, position, &len);
- for (i = 2; i < len; i++)
- if (position[i] != '0') break;
+ if (has_virt_addr(addr))
+ {
+ for (i = 2; i < len; i++)
+ if (position[i] != '0') break;
- if (i == len)
- i = len - 1;
+ if (i == len)
+ i = len - 1;
- if (i > 0)
- g_buffer_line_append_text(line, BLC_VIRTUAL, position, i, RTT_PHYS_ADDR_PAD, NULL);
+ if (i > 0)
+ g_buffer_line_append_text(line, BLC_VIRTUAL, position, i, RTT_PHYS_ADDR_PAD, NULL);
+
+ g_buffer_line_append_text(line, BLC_VIRTUAL, &position[i], len - i, RTT_PHYS_ADDR, NULL);
- g_buffer_line_append_text(line, BLC_VIRTUAL, &position[i], len - i, RTT_PHYS_ADDR, NULL);
+ }
+
+ else
+ g_buffer_line_append_text(line, BLC_VIRTUAL, position, len, RTT_PHYS_ADDR_PAD, NULL);
}