From f17ac8250980a575b2bc4d9e4968102075bd89d9 Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Sun, 9 Mar 2014 20:32:05 -0500 Subject: [PATCH] core: set reasonably safe default for 'codeend' Its reasonably safe to assume that 'codeend' can not be past 'flashend' so that's a good default value. --- simavr/sim/sim_avr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/simavr/sim/sim_avr.c b/simavr/sim/sim_avr.c index 0366b58..73b049a 100644 --- a/simavr/sim/sim_avr.c +++ b/simavr/sim/sim_avr.c @@ -70,6 +70,7 @@ int avr_init(avr_t * avr) { avr->flash = malloc(avr->flashend + 1); memset(avr->flash, 0xff, avr->flashend + 1); + avr->codeend = avr->flashend; avr->data = malloc(avr->ramend + 1); memset(avr->data, 0, avr->ramend + 1); #ifdef CONFIG_SIMAVR_TRACE -- 2.39.5