Provide AVOID_UB for some bugs found in GCC compiler testing (#1785)

* Provide AVOID_UB for some bugs found in GCC compiler testing

Co-authored-by: Fig02 <fig02srl@gmail.com>

* Format

* Fix silly typo

* Mention MM3D in en_dnq bug comment

---------

Co-authored-by: Fig02 <fig02srl@gmail.com>
This commit is contained in:
Tharo
2025-01-20 22:52:03 +00:00
committed by GitHub
parent 37e5653755
commit 2b069011be
6 changed files with 57 additions and 8 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ s32 Yaz0_DecompressImpl(u8* src, u8* dst) {
// N = chunkSize; B = back offset
// 3 bytes 0B BB NN
// 2 bytes NB BB
chunkSize = (nibble == 0) ? *src++ + 0x12 : nibble + 2;
chunkSize = (nibble == 0) ? (u32)(*src++ + 0x12) : nibble + 2;
do {
*dst++ = *(backPtr++ - 1);