mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 13:27:45 -07:00
VideoCommon/OpcodeDecoding: Resolve implicit signedness conversion
cmd2 is a u32, so any bitwise arithmetic on it with a type of the same size or smaller will result in a u32 value. This is also implicitly converted to an unsigned type in the if statement as well, given that size_t * int -> size_t. This is just more explicit about the operations occurring and also likely silences a sign conversion warning.
This commit is contained in:
parent
4710b82f43
commit
6339a5ea8e
@ -136,7 +136,7 @@ u8* Run(DataReader src, u32* cycles, bool in_display_list)
|
||||
return finish_up();
|
||||
|
||||
const u32 cmd2 = src.Read<u32>();
|
||||
const int transfer_size = ((cmd2 >> 16) & 15) + 1;
|
||||
const u32 transfer_size = ((cmd2 >> 16) & 15) + 1;
|
||||
if (src.size() < transfer_size * sizeof(u32))
|
||||
return finish_up();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user