diff options
| author | 2017-04-26 14:52:40 +0300 | |
|---|---|---|
| committer | 2017-06-26 00:43:23 +0300 | |
| commit | 22994607cc281bc7f1c4e37f23722e5dea1d56a5 (patch) | |
| tree | 58a2206d906b804ba2ed84d9c072c139d7d02ab3 | |
| parent | Merge pull request #2792 from wwylele/lutlutlut (diff) | |
| download | yuzu-22994607cc281bc7f1c4e37f23722e5dea1d56a5.tar.gz yuzu-22994607cc281bc7f1c4e37f23722e5dea1d56a5.tar.xz yuzu-22994607cc281bc7f1c4e37f23722e5dea1d56a5.zip | |
apt/shared_font: don't relocate zero offset
| -rw-r--r-- | src/core/hle/service/apt/bcfnt/bcfnt.cpp | 6 |
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) { |