diff options
| author | Weiyi Wang <wwylele@gmail.com> | 2017-07-16 20:12:55 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-16 20:12:55 +0300 |
| commit | e634b757544c2dc256888d3b0bbf481ad6f95227 (patch) | |
| tree | 6c3b60339ab4d766bc308a240b01158138101005 /src/core/hle/service/apt/bcfnt/bcfnt.cpp | |
| parent | 5137a198f9d64a8f8afb16ef5976c706eeeb3fa3 (diff) | |
| parent | 9549eed0be790ff96574c23dd02ae7f9e00b2ca3 (diff) | |
Merge pull request #2784 from wwylele/font-archive
load shared font from system archive
Diffstat (limited to 'src/core/hle/service/apt/bcfnt/bcfnt.cpp')
| -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 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) { |
