Skip to content
Snippets Groups Projects
Commit 135aec7b authored by bunnei's avatar bunnei
Browse files

shader_jit_x64: Fix strict memory aliasing issues.

parent e5d41721
No related branches found
No related tags found
No related merge requests found
......@@ -741,7 +741,9 @@ void JitCompiler::Compile_Block(unsigned end) {
void JitCompiler::Compile_NextInstr(unsigned* offset) {
offset_ptr = offset;
Instruction instr = *(Instruction*)&g_state.vs.program_code[(*offset_ptr)++];
Instruction instr;
std::memcpy(&instr, &g_state.vs.program_code[(*offset_ptr)++], sizeof(Instruction));
OpCode::Id opcode = instr.opcode.Value();
auto instr_func = instr_table[static_cast<unsigned>(opcode)];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment