aboutsummaryrefslogtreecommitdiff
path: root/core/fmt
diff options
context:
space:
mode:
authorTetralux <tetraluxonpc@gmail.com>2024-08-12 16:24:01 +0000
committerTetralux <tetraluxonpc@gmail.com>2024-08-12 16:25:22 +0000
commit4f568222048d49a12eb66bf92bc5787d74582863 (patch)
treeffac25ab88858f50d07979fdad6f7a40ea696268 /core/fmt
parentb71e0c2e3673b5b712847cf67e9a196a4d2d136b (diff)
[fmt] Add bit fields to the pointer printing logic
core:fmt prints pointers to structs as `&StructName{ ... }` but `bit_field`s are currently printed the same as rawptrs (`0xAABBCCDDEEFF` only). This commit changes that so they behave the same as structs and unions.
Diffstat (limited to 'core/fmt')
-rw-r--r--core/fmt/fmt.odin3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/fmt/fmt.odin b/core/fmt/fmt.odin
index 7b86fd1b7..0d11ad8a9 100644
--- a/core/fmt/fmt.odin
+++ b/core/fmt/fmt.odin
@@ -2728,7 +2728,8 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) {
}
case runtime.Type_Info_Struct,
- runtime.Type_Info_Union:
+ runtime.Type_Info_Union,
+ runtime.Type_Info_Bit_Field:
if ptr == nil {
io.write_string(fi.writer, "<nil>", &fi.n)
return