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:
Lioncash 2019-12-05 08:43:34 -05:00
parent 4710b82f43
commit 6339a5ea8e

View File

@ -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();