Skip to content

Commit

Permalink
Clean up format of console output for memory tables
Browse files Browse the repository at this point in the history
  • Loading branch information
wins1ey committed Jun 8, 2024
1 parent 4081c06 commit c4a692a
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,13 +294,16 @@ int store_memory_tables(lua_State* L, const char* version)

for (int i = 0; i < memory_table_count; i++) {
MemoryTable* table = &memory_tables[i];
printf("Name: %s, ", table->name);
printf("Type: %s, ", table->type);
printf("Module: %s, ", table->module);
printf("Address: %ld, ", table->address);
printf("Offsets: ");
for (int j = 0; j < table->offset_count; j++) {
printf("%d ", table->offsets[j]);
printf("%s ", table->name);
printf("%s ", table->type);
if (table->module) {
printf("%s ", table->module);
}
printf("0x%lX ", table->address);
if (table->offset_count) {
for (int i = 0; i < table->offset_count; i++) {
printf("0x%X ", table->offsets[i]);
}
}
printf("\n");
}
Expand Down

0 comments on commit c4a692a

Please sign in to comment.