diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-02-17 17:29:56 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-02-17 17:29:56 -0500 |
| commit | dbd7502a1dcee6b99434f39393cb356efa542ddc (patch) | |
| tree | b8ae469719326ba2c3daf019e545c4713ab0235f /builtins/memory.c | |
| parent | 5c49314ed4380f4e12a05888f635caa9af4a7cf4 (diff) | |
Fix up some builtins
Diffstat (limited to 'builtins/memory.c')
| -rw-r--r-- | builtins/memory.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtins/memory.c b/builtins/memory.c index 4db6ca39..5397ab28 100644 --- a/builtins/memory.c +++ b/builtins/memory.c @@ -17,13 +17,13 @@ extern const void *SSS_HASH_VECTOR; public CORD Memory__cord(const void *p, bool colorize, const TypeInfo *type) { (void)type; + if (!p) return "Memory"; CORD cord; - CORD_sprintf(&cord, colorize ? "\x1b[0;34;1mMemory<%p>\x1b[m" : "Memory<%p>", p); + CORD_sprintf(&cord, colorize ? "\x1b[0;34;1mMemory<%p>\x1b[m" : "Memory<%p>", *(const void**)p); return cord; } public TypeInfo Memory_type = { - .name="Memory", .size=0, .align=0, .tag=CustomInfo, |
