From 170123982dfa8d5f7508d9808cf83d592267db21 Mon Sep 17 00:00:00 2001 From: bunnei Date: Wed, 3 Dec 2014 01:05:16 -0500 Subject: GPU: Fixed bug in command list size decoding. --- src/video_core/command_processor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/video_core') diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp index 298b04c5..585323a8 100644 --- a/src/video_core/command_processor.cpp +++ b/src/video_core/command_processor.cpp @@ -272,8 +272,9 @@ static std::ptrdiff_t ExecuteCommandBlock(const u32* first_command_word) { void ProcessCommandList(const u32* list, u32 size) { u32* read_pointer = (u32*)list; + u32 list_length = size / sizeof(u32); - while (read_pointer < list + size) { + while (read_pointer < list + list_length) { read_pointer += ExecuteCommandBlock(read_pointer); } } -- cgit v1.2.3