summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/hle/service/apt/bcfnt/bcfnt.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/service/apt/bcfnt/bcfnt.cpp b/src/core/hle/service/apt/bcfnt/bcfnt.cpp
index 57eb39d75..6d2474702 100644
--- a/src/core/hle/service/apt/bcfnt/bcfnt.cpp
+++ b/src/core/hle/service/apt/bcfnt/bcfnt.cpp
@@ -78,7 +78,8 @@ void RelocateSharedFont(Kernel::SharedPtr<Kernel::SharedMemory> shared_font, VAd
78 memcpy(&cmap, data, sizeof(cmap)); 78 memcpy(&cmap, data, sizeof(cmap));
79 79
80 // Relocate the offsets in the CMAP section 80 // Relocate the offsets in the CMAP section
81 cmap.next_cmap_offset += offset; 81 if (cmap.next_cmap_offset != 0)
82 cmap.next_cmap_offset += offset;
82 83
83 memcpy(data, &cmap, sizeof(cmap)); 84 memcpy(data, &cmap, sizeof(cmap));
84 } else if (memcmp(section_header.magic, "CWDH", 4) == 0) { 85 } else if (memcmp(section_header.magic, "CWDH", 4) == 0) {
@@ -86,7 +87,8 @@ void RelocateSharedFont(Kernel::SharedPtr<Kernel::SharedMemory> shared_font, VAd
86 memcpy(&cwdh, data, sizeof(cwdh)); 87 memcpy(&cwdh, data, sizeof(cwdh));
87 88
88 // Relocate the offsets in the CWDH section 89 // Relocate the offsets in the CWDH section
89 cwdh.next_cwdh_offset += offset; 90 if (cwdh.next_cwdh_offset != 0)
91 cwdh.next_cwdh_offset += offset;
90 92
91 memcpy(data, &cwdh, sizeof(cwdh)); 93 memcpy(data, &cwdh, sizeof(cwdh));
92 } else if (memcmp(section_header.magic, "TGLP", 4) == 0) { 94 } else if (memcmp(section_header.magic, "TGLP", 4) == 0) {