[Kernel] *FormatData: make peek() match get() endian, fix skip() not advancing pointer

This commit is contained in:
emoose 2020-02-24 19:31:13 +00:00 committed by Rick Gibbed
parent 90b772a330
commit ac5d548e90
1 changed files with 5 additions and 5 deletions

View File

@ -727,7 +727,7 @@ class StringFormatData : public FormatData {
void skip(int32_t count) {
while (count-- > 0) {
if (!*input_) {
if (!get()) {
break;
}
}
@ -760,11 +760,11 @@ class WideStringFormatData : public FormatData {
return xe::byte_swap(result);
}
uint16_t peek(int32_t offset) { return input_[offset]; }
uint16_t peek(int32_t offset) { return xe::byte_swap(input_[offset]); }
void skip(int32_t count) {
while (count-- > 0) {
if (!*input_) {
if (!get()) {
break;
}
}
@ -794,11 +794,11 @@ class WideCountFormatData : public FormatData {
return xe::byte_swap(result);
}
uint16_t peek(int32_t offset) { return input_[offset]; }
uint16_t peek(int32_t offset) { return xe::byte_swap(input_[offset]); }
void skip(int32_t count) {
while (count-- > 0) {
if (!*input_) {
if (!get()) {
break;
}
}