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