From 16c70777f259dd66436ca9eed7b4685e210b5229 Mon Sep 17 00:00:00 2001 From: "(Tim) Efthimis Kritikos" Date: Fri, 26 Jan 2024 12:24:43 +0000 Subject: [PATCH] GUI: fixed a segfault --- gui.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gui.c b/gui.c index db0a006..412bd19 100644 --- a/gui.c +++ b/gui.c @@ -155,8 +155,11 @@ int update_general_memdump(struct simdata_t *simdata){ wmove(general_memdump,h+2,2+(width-12)%2); wprintw(general_memdump,"%06x ",ADDRESS); uint32_t temp_address=ADDRESS; - for (int i=0;iRAM[temp_address++]); + for (int i=0;iRAM[ADDRESS]); + ADDRESS=(ADDRESS+1)&0xFFFFFF; + } + ADDRESS=temp_address; for (int i=0;iRAM[ADDRESS]>=0x20&&simdata->RAM[ADDRESS]<0x7F)?simdata->RAM[ADDRESS]:'.'); ADDRESS=(ADDRESS+1)&0xFFFFFF;