From 6711a8fe112f1ed78823a32ce2c5cb453e7b615f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Kujawa?= Date: Thu, 2 Feb 2017 14:43:02 +0100 Subject: [PATCH] Fix bus space array indexing. Makes bus loading from buffer work. --- src/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bus.c b/src/bus.c index 85c7771..4608350 100644 --- a/src/bus.c +++ b/src/bus.c @@ -57,7 +57,7 @@ bus_load_buf(bus_t *t, uint16_t addr, uint8_t *buf, uint16_t bufsize) /* XXX: add sanity checks */ while (i < bufsize) { - t->space[i] = buf[i]; // XXX: overflow addr + t->space[addr+i] = buf[i]; // XXX: overflow addr i++; }