]> git.proxmox.com Git - qemu.git/blobdiff - hw/smc91c111.c
smc91c111: mask register offset
[qemu.git] / hw / smc91c111.c
index c1a88c9e56239a43399271fba6047230e998037d..a2ef299c04b40c697e7265ac412e820ca22eb44d 100644 (file)
@@ -250,6 +250,7 @@ static void smc91c111_writeb(void *opaque, target_phys_addr_t offset,
 {
     smc91c111_state *s = (smc91c111_state *)opaque;
 
+    offset = offset & 0xf;
     if (offset == 14) {
         s->bank = value;
         return;
@@ -421,6 +422,7 @@ static uint32_t smc91c111_readb(void *opaque, target_phys_addr_t offset)
 {
     smc91c111_state *s = (smc91c111_state *)opaque;
 
+    offset = offset & 0xf;
     if (offset == 14) {
         return s->bank;
     }