summaryrefslogtreecommitdiff
path: root/lib/simulator.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/simulator.c')
-rw-r--r--lib/simulator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/simulator.c b/lib/simulator.c
index 4ac415c..86fe1b4 100644
--- a/lib/simulator.c
+++ b/lib/simulator.c
@@ -401,6 +401,7 @@ void ChargeBinaire(char *filename)
if (readword(file) != 0x58454e4e) { /* verification de la signature */
exception(1, _("Signature invalid"));
}
+
sprintf(message, _("Total Size Of The Binary File: %d"), readword(file));
pushcontext(message);
nb = readword(file); /* taille du segment text */
@@ -408,12 +409,11 @@ void ChargeBinaire(char *filename)
nbss = readword(file); /* taille des donnees non init */
nr = readword(file); /* taille de la table de relogement */
- relocation_table = Emalloc(nr);
+ relocation_table = (Uint32 *) Emalloc(nr * sizeof(Uint32));
for (i = 0; i < nr; i++) {
relocation_table[i] = readword(file);
}
-
for (i = base_addr; i < (base_addr + nb + ns); i++) { /*chargement en ram de .text et .data */
ST(i, readword(file));
}