From 6624cb7a78fec64c933ecd9bf43db5de5c1ba26f Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 10 Feb 2020 23:19:47 -0500 Subject: [PATCH] Corrects set_ram macro to act more like a function. --- Machines/Commodore/Vic-20/Vic20.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Machines/Commodore/Vic-20/Vic20.cpp b/Machines/Commodore/Vic-20/Vic20.cpp index 71a989a10..2440c1fdb 100644 --- a/Machines/Commodore/Vic-20/Vic20.cpp +++ b/Machines/Commodore/Vic-20/Vic20.cpp @@ -397,9 +397,10 @@ class ConcreteMachine: memset(processor_write_memory_map_, 0, sizeof(processor_write_memory_map_)); memset(mos6560_bus_handler_.video_memory_map, 0, sizeof(mos6560_bus_handler_.video_memory_map)); -#define set_ram(baseaddr, length) \ - write_to_map(processor_read_memory_map_, &ram_[baseaddr], baseaddr, length); \ - write_to_map(processor_write_memory_map_, &ram_[baseaddr], baseaddr, length); +#define set_ram(baseaddr, length) { \ + write_to_map(processor_read_memory_map_, &ram_[baseaddr], baseaddr, length); \ + write_to_map(processor_write_memory_map_, &ram_[baseaddr], baseaddr, length); \ + } // Add 6502-visible RAM as requested. set_ram(0x0000, 0x0400);