Commit e35ef18449e1783fa416c85e41fd3d70b82d15af

Thomas de Grivel 2025-04-18T21:46:06

fix buf_inspect_str_size

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/libkc3/buf_inspect.c b/libkc3/buf_inspect.c
index e75efd6..90b4129 100644
--- a/libkc3/buf_inspect.c
+++ b/libkc3/buf_inspect.c
@@ -3536,8 +3536,10 @@ sw buf_inspect_str_size (s_pretty *pretty, const s_str *str)
     return buf_inspect_str_reserved_size(pretty, str, true);
   if ((r = buf_write_1_size(pretty, "\"")) < 0)
     return r;
+  result += r; 
+  if ((r = buf_write_str_size(pretty, str)) < 0)
+    return r;
   result += r;
-  result += str->size;
   if ((r = buf_write_1_size(pretty, "\"")) < 0)
     return r;
   result += r;