diff --git a/libkc3/buf_inspect.c b/libkc3/buf_inspect.c
index dc020e0..bcae46e 100644
--- a/libkc3/buf_inspect.c
+++ b/libkc3/buf_inspect.c
@@ -2006,7 +2006,7 @@ sw buf_inspect_ptr_free_size (const u_ptr_w *ptr)
sw result;
(void) ptr;
result = strlen("(PtrFree) 0x");
- result += sizeof(uw) / 4;
+ result += buf_inspect_uw_hexadecimal_size((uw *) &ptr->p);
return result;
}
@@ -2015,7 +2015,7 @@ sw buf_inspect_ptr_size (const u_ptr_w *ptr)
sw result;
(void) ptr;
result = strlen("(Ptr) 0x");
- result += sizeof(uw) / 4;
+ result += buf_inspect_uw_hexadecimal_size((uw *) &ptr->p);
return result;
}
diff --git a/test/ikc3/str.kc3 b/test/ikc3/str.kc3
index 92803cf..2018a0b 100644
--- a/test/ikc3/str.kc3
+++ b/test/ikc3/str.kc3
@@ -55,7 +55,7 @@ quote "#{%KC3.Operator{}}"
quote "#{%KC3.Operator{sym: :-}}"
"#{%KC3.Operator{sym: :-}}"
quote "#{false}"
-"#{(Sw) 0}"
+"#{false}"
quote "#{(Ptr) 0}"
"#{(Ptr) 0}"
quote "#{(Sw) 0}"
diff --git a/test/ikc3/str.out.expected b/test/ikc3/str.out.expected
index 6eae7e0..505e5f3 100644
--- a/test/ikc3/str.out.expected
+++ b/test/ikc3/str.out.expected
@@ -39,3 +39,15 @@
"%KC3.Operator{sym: :+, symbol_value: ?, operator_precedence: (U8) 0, operator_associativity: :left}"
"#{%KC3.Operator{sym: :-}}"
"%KC3.Operator{sym: :-, symbol_value: ?, operator_precedence: (U8) 0, operator_associativity: :left}"
+"#{false}"
+"false"
+"#{(Ptr) 0}"
+"(Ptr) 0x0"
+"#{(Sw) 0}"
+"0"
+"#{(Uw) 0}"
+"0"
+"#{%Buf{}}"
+"%Buf{column: (Sw) 0, flush: (Ptr) 0x0, free: false, line: (Sw) 0, ptr: (Ptr) 0x0, refill: (Ptr) 0x0, rpos: (Uw) 0, save: (Ptr) 0x0, seek: (Ptr) 0x0, size: (Uw) 0, user_ptr: (Ptr) 0x0, wpos: (Uw) 0}"
+"#{%BufRW{}}"
+"%BufRW{r: %Buf{column: (Sw) 0, flush: (Ptr) 0x0, free: false, line: (Sw) 0, ptr: (Ptr) 0x0, refill: (Ptr) 0x0, rpos: (Uw) 0, save: (Ptr) 0x0, seek: (Ptr) 0x0, size: (Uw) 0, user_ptr: (Ptr) 0x0, wpos: (Uw) 0}, w: %Buf{column: (Sw) 0, flush: (Ptr) 0x0, free: false, line: (Sw) 0, ptr: (Ptr) 0x0, refill: (Ptr) 0x0, rpos: (Uw) 0, save: (Ptr) 0x0, seek: (Ptr) 0x0, size: (Uw) 0, user_ptr: (Ptr) 0x0, wpos: (Uw) 0}}"