From 2e80fc00fed31684a09e491b7c06c4a0fab7716f Mon Sep 17 00:00:00 2001 From: illusion <37698908+illusion0001@users.noreply.github.com> Date: Tue, 25 Feb 2020 11:49:46 +0700 Subject: [PATCH] Revert "[Kernel] *FormatData: make peek() match get() endian, fix skip() not advancing pointer" This reverts commit 086c28e55db9da059b629fff72e4d5bd909e69f9. --- src/xenia/kernel/xboxkrnl/xboxkrnl_strings.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/xenia/kernel/xboxkrnl/xboxkrnl_strings.cc b/src/xenia/kernel/xboxkrnl/xboxkrnl_strings.cc index d5313ed7f..5dfc115ee 100644 --- a/src/xenia/kernel/xboxkrnl/xboxkrnl_strings.cc +++ b/src/xenia/kernel/xboxkrnl/xboxkrnl_strings.cc @@ -731,7 +731,7 @@ class StringFormatData : public FormatData { void skip(int32_t count) { while (count-- > 0) { - if (!get()) { + if (!*input_) { break; } } @@ -764,11 +764,11 @@ class WideStringFormatData : public FormatData { return xe::byte_swap(result); } - uint16_t peek(int32_t offset) { return xe::byte_swap(input_[offset]); } + uint16_t peek(int32_t offset) { return input_[offset]; } void skip(int32_t count) { while (count-- > 0) { - if (!get()) { + if (!*input_) { break; } } @@ -798,11 +798,11 @@ class WideCountFormatData : public FormatData { return xe::byte_swap(result); } - uint16_t peek(int32_t offset) { return xe::byte_swap(input_[offset]); } + uint16_t peek(int32_t offset) { return input_[offset]; } void skip(int32_t count) { while (count-- > 0) { - if (!get()) { + if (!*input_) { break; } }