From 442f1499f0ae65f4e75e82699b0d14a1515cc987 Mon Sep 17 00:00:00 2001
From: Lauchmelder <robert.trololo@gmail.com>
Date: Sat, 30 Oct 2021 19:49:02 +0200
Subject: [PATCH] fixed gcc build errors

---
 NES Emulator/cpu.c | 4 ++--
 NES Emulator/log.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/NES Emulator/cpu.c b/NES Emulator/cpu.c
index 4769394..4475aad 100644
--- a/NES Emulator/cpu.c	
+++ b/NES Emulator/cpu.c	
@@ -12,7 +12,7 @@ static inline void Push(struct Bus* bus, Byte val)
 
 static inline Byte Pop(struct Bus* bus)
 {
-	return readBus(bus, 0x0100 + (++bus->cpu->sp), 0);
+	return readBus(bus, 0x0100 + (++bus->cpu->sp));
 }
 
 struct CPU* createCPU(struct Bus* parent)
@@ -26,7 +26,7 @@ struct CPU* createCPU(struct Bus* parent)
 
 	// TODO: THIS IS JUST FOR THE TEST ROM
 	cpu->pc.word = 0xC000;
-	cpu->pc.word = ((Word)readBus(parent, 0xFFFD, 0) << 8) | readBus(parent, 0xFFFC, 0);
+	cpu->pc.word = ((Word)readBus(parent, 0xFFFD) << 8) | readBus(parent, 0xFFFC);
 
 	cpu->status.raw = 0x34;
 	cpu->acc = 0;
diff --git a/NES Emulator/log.c b/NES Emulator/log.c
index 5e72fba..97aee3e 100644
--- a/NES Emulator/log.c	
+++ b/NES Emulator/log.c	
@@ -16,7 +16,7 @@ void logBusState(struct Bus* bus)
 	Word instructionBytes[3];
 	for (int i = 0; i < bus->cpu->currentOpcode->length; i++)
 	{
-		instructionBytes[i] = readBus(bus, oldPC + i, 0);
+		instructionBytes[i] = readBus(bus, oldPC + i);
 		sprintf(buffer + 3 * i, "%02X ", instructionBytes[i]);
 	}