mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-30 11:20:08 +00:00
Fix type info generation
The problem: entry's index != entry->value in info_type_map But I was assuming this
This commit is contained in:
+7
-3
@@ -419,11 +419,15 @@ print_any_to_buffer :: proc(buf: ^[]byte, arg: any) {
|
||||
print_bool_to_buffer(buf, v)
|
||||
|
||||
case Pointer:
|
||||
v := null;
|
||||
if arg.data != null {
|
||||
v = (arg.data as ^rawptr)^
|
||||
if arg.type_info == type_info(^Type_Info) {
|
||||
print_type_to_buffer(buf, (arg.data as ^^Type_Info)^)
|
||||
} else {
|
||||
print_pointer_to_buffer(buf, (arg.data as ^rawptr)^)
|
||||
}
|
||||
} else {
|
||||
print_pointer_to_buffer(buf, null)
|
||||
}
|
||||
print_pointer_to_buffer(buf, v)
|
||||
|
||||
case Enum:
|
||||
value: i64 = 0
|
||||
|
||||
Reference in New Issue
Block a user