From 5161ef8ff3808ce1eb83804f6be34cb5aaadb6a1 Mon Sep 17 00:00:00 2001 From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> Date: Mon, 29 Apr 2024 00:48:11 +0300 Subject: [PATCH] Avoid narrowing conversions in initializer list --- src/lua.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lua.cpp b/src/lua.cpp index e53ae6a1..e835d463 100644 --- a/src/lua.cpp +++ b/src/lua.cpp @@ -217,10 +217,10 @@ static int disassembleARMThunk(lua_State* L) { std::string disassembly; // Convert instruction to byte array to pass to Capstone std::array bytes = { - instruction & 0xff, - (instruction >> 8) & 0xff, - (instruction >> 16) & 0xff, - (instruction >> 24) & 0xff, + u8(instruction & 0xff), + u8((instruction >> 8) & 0xff), + u8((instruction >> 16) & 0xff), + u8((instruction >> 24) & 0xff), }; disassembler.disassemble(disassembly, pc, std::span(bytes));