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

This commit is contained in:
emoose 2019-12-24 06:12:49 +00:00 committed by illusion
parent 958a9bfa29
commit 9b3ef10f21
1 changed files with 5 additions and 5 deletions

View File

@ -728,7 +728,7 @@ class StringFormatData : public FormatData {
void skip(int32_t count) {
while (count-- > 0) {
if (!*input_) {
if (!get()) {
break;
}
}
@ -761,11 +761,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;
}
}
@ -795,11 +795,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;
}
}