Minor null check fix.

This commit is contained in:
harry 2024-02-05 18:34:03 -05:00
parent 401110bae8
commit 2f2482e950
1 changed files with 3 additions and 3 deletions

View File

@ -485,7 +485,7 @@ PpuScriptObject::~PpuScriptObject()
uint8_t PpuScriptObject::readByte(int address) uint8_t PpuScriptObject::readByte(int address)
{ {
uint8_t byte = 0; uint8_t byte = 0;
if (FFCEUX_PPURead == nullptr) if (FFCEUX_PPURead != nullptr)
{ {
byte = FFCEUX_PPURead(address); byte = FFCEUX_PPURead(address);
} }
@ -495,7 +495,7 @@ uint8_t PpuScriptObject::readByte(int address)
uint8_t PpuScriptObject::readByteUnsigned(int address) uint8_t PpuScriptObject::readByteUnsigned(int address)
{ {
uint8_t byte = 0; uint8_t byte = 0;
if (FFCEUX_PPURead == nullptr) if (FFCEUX_PPURead != nullptr)
{ {
byte = FFCEUX_PPURead(address); byte = FFCEUX_PPURead(address);
} }
@ -505,7 +505,7 @@ uint8_t PpuScriptObject::readByteUnsigned(int address)
int8_t PpuScriptObject::readByteSigned(int address) int8_t PpuScriptObject::readByteSigned(int address)
{ {
int8_t byte = 0; int8_t byte = 0;
if (FFCEUX_PPURead == nullptr) if (FFCEUX_PPURead != nullptr)
{ {
byte = static_cast<int8_t>(FFCEUX_PPURead(address)); byte = static_cast<int8_t>(FFCEUX_PPURead(address));
} }