Continue fixing strict aliasing warnings

This commit is contained in:
Nekotekina 2021-03-13 18:02:37 +03:00
parent aff63028d4
commit c22e1e71f0
12 changed files with 65 additions and 45 deletions

View file

@ -9,6 +9,8 @@
#include "Emu/Cell/lv2/sys_fs.h"
#include "cellJpgDec.h"
#include "util/asm.hpp"
LOG_CHANNEL(cellJpgDec);
// Temporarily
@ -146,8 +148,8 @@ error_code cellJpgDecReadHeader(u32 mainHandle, u32 subHandle, vm::ptr<CellJpgDe
}
}
if (*reinterpret_cast<le_t<u32>*>(buffer.get()) != 0xE0FFD8FF || // Error: Not a valid SOI header
*reinterpret_cast<u32*>(buffer.get() + 6) != "JFIF"_u32) // Error: Not a valid JFIF string
if (*utils::bless<le_t<u32>>(buffer.get() + 0) != 0xE0FFD8FF || // Error: Not a valid SOI header
*utils::bless<u32>(buffer.get() + 6) != "JFIF"_u32) // Error: Not a valid JFIF string
{
return CELL_JPGDEC_ERROR_HEADER;
}