cores: Now duplicate the global structure
[simavr] / simavr / cores / sim_mega48.c
index 08771af..18fe00a 100644 (file)
@@ -33,7 +33,7 @@
 
 static avr_t * make()
 {
-       return &SIM_CORENAME.core;
+       return avr_core_allocate(&SIM_CORENAME.core, sizeof(struct mcu_t));
 }
 
 avr_kind_t mega48 = {