summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/OpcodeDecoding.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-12-05 08:43:34 -0500
committerLioncash <mathew1800@gmail.com>2019-12-05 09:13:06 -0500
commit6339a5ea8ea8920c1c7f1076b687512013da1457 (patch)
tree90d88fb44195c0a7da880d8cd6c3a9caab2b79c5 /Source/Core/VideoCommon/OpcodeDecoding.cpp
parent4710b82f43eb9b58db0b57566bcf88e4d1773396 (diff)
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.
Diffstat (limited to 'Source/Core/VideoCommon/OpcodeDecoding.cpp')
-rw-r--r--Source/Core/VideoCommon/OpcodeDecoding.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/OpcodeDecoding.cpp b/Source/Core/VideoCommon/OpcodeDecoding.cpp
index 8aeb385977..ab904e6a8c 100644
--- a/Source/Core/VideoCommon/OpcodeDecoding.cpp
+++ b/Source/Core/VideoCommon/OpcodeDecoding.cpp
@@ -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();