changeset 1394:ae3b1721b226

Small fix to handling of the "bus" option in a RAM type ROM DB memory map
author Michael Pavone <pavone@retrodev.com>
date Mon, 05 Jun 2017 23:03:46 -0700
parents 0aaf2946117c
children efa7225e0f07
files romdb.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/romdb.c	Sun Jun 04 10:08:20 2017 -0700
+++ b/romdb.c	Mon Jun 05 23:03:46 2017 -0700
@@ -814,9 +814,9 @@
 		map->mask = calc_mask(size, start, end);
 		map->flags = MMAP_READ | MMAP_WRITE;
 		char *bus = tern_find_ptr_default(node, "bus", "both");
-		if (!strcmp(dtype, "odd")) {
+		if (!strcmp(bus, "odd")) {
 			map->flags |= MMAP_ONLY_ODD;
-		} else if (!strcmp(dtype, "even")) {
+		} else if (!strcmp(bus, "even")) {
 			map->flags |= MMAP_ONLY_EVEN;
 		} else {
 			map->flags |= MMAP_CODE;