summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorwwylele <wwylele@gmail.com>2017-04-26 13:52:40 +0200
committerwwylele <wwylele@gmail.com>2017-06-25 23:43:23 +0200
commit22994607cc281bc7f1c4e37f23722e5dea1d56a5 (patch)
tree58a2206d906b804ba2ed84d9c072c139d7d02ab3 /src/core/hle/service
parentMerge pull request #2792 from wwylele/lutlutlut (diff)
downloadyuzu-22994607cc281bc7f1c4e37f23722e5dea1d56a5.tar
yuzu-22994607cc281bc7f1c4e37f23722e5dea1d56a5.tar.gz
yuzu-22994607cc281bc7f1c4e37f23722e5dea1d56a5.tar.bz2
yuzu-22994607cc281bc7f1c4e37f23722e5dea1d56a5.tar.lz
yuzu-22994607cc281bc7f1c4e37f23722e5dea1d56a5.tar.xz
yuzu-22994607cc281bc7f1c4e37f23722e5dea1d56a5.tar.zst
yuzu-22994607cc281bc7f1c4e37f23722e5dea1d56a5.zip
Diffstat (limited to 'src/core/hle/service')
-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
memcpy(&cmap, data, sizeof(cmap));
// Relocate the offsets in the CMAP section
- cmap.next_cmap_offset += offset;
+ if (cmap.next_cmap_offset != 0)
+ cmap.next_cmap_offset += offset;
memcpy(data, &cmap, sizeof(cmap));
} else if (memcmp(section_header.magic, "CWDH", 4) == 0) {
@@ -86,7 +87,8 @@ void RelocateSharedFont(Kernel::SharedPtr<Kernel::SharedMemory> shared_font, VAd
memcpy(&cwdh, data, sizeof(cwdh));
// Relocate the offsets in the CWDH section
- cwdh.next_cwdh_offset += offset;
+ if (cwdh.next_cwdh_offset != 0)
+ cwdh.next_cwdh_offset += offset;
memcpy(data, &cwdh, sizeof(cwdh));
} else if (memcmp(section_header.magic, "TGLP", 4) == 0) {