[Kernel] *FormatData: make peek() match get() endian, fix skip() not advancing pointer
This commit is contained in:
parent
90b772a330
commit
ac5d548e90
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue