aboutsummaryrefslogtreecommitdiff
path: root/src/NDSCart.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/NDSCart.cpp')
-rw-r--r--src/NDSCart.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/NDSCart.cpp b/src/NDSCart.cpp
index a6e16df..35418eb 100644
--- a/src/NDSCart.cpp
+++ b/src/NDSCart.cpp
@@ -1602,7 +1602,15 @@ bool LoadROM(const u8* romdata, u32 romlen)
memcpy(CartROM, romdata, romlen);
memcpy(&Header, CartROM, sizeof(Header));
- memcpy(&Banner, CartROM + Header.BannerOffset, sizeof(Banner));
+
+ if (!Header.BannerOffset)
+ {
+ memset(&Banner, 0, sizeof(Banner));
+ }
+ else
+ {
+ memcpy(&Banner, CartROM + Header.BannerOffset, sizeof(Banner));
+ }
printf("Game code: %.4s\n", Header.GameCode);