perfaware/part1: Fix loop increment to get listing_0038 working

This commit is contained in:
doyle 2023-03-06 22:29:07 +11:00 committed by committed-name
parent 954c982856
commit fec3db7b3f
2 changed files with 3 additions and 3 deletions

View File

@ -259,9 +259,9 @@ int main(int argc, char **argv)
S86_PrintLn(S86_STR8("bits 16"));
S86_ASSERT(buffer.size % 2 == 0); // We expect 2 byte instructions
for (size_t buffer_index = 0; buffer_index < (buffer.size / 2); buffer_index++) {
uint8_t byte0 = (uint8_t)buffer.data[buffer_index + 0];
uint8_t byte1 = (uint8_t)buffer.data[buffer_index + 1];
for (size_t buffer_index = 0; buffer_index < buffer.size; buffer_index += 2) {
uint8_t byte0 = (uint8_t)buffer.data[buffer_index + 0];
uint8_t byte1 = (uint8_t)buffer.data[buffer_index + 1];
uint16_t byte01 = (uint16_t)byte0 << 8 | (uint16_t)byte1 << 0;
S86_InstructionType instruction_type = S86_InstructionType_Count;

Binary file not shown.