aboutsummaryrefslogtreecommitdiff
path: root/builtins/bool.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-02-17 17:29:56 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-02-17 17:29:56 -0500
commitdbd7502a1dcee6b99434f39393cb356efa542ddc (patch)
treeb8ae469719326ba2c3daf019e545c4713ab0235f /builtins/bool.c
parent5c49314ed4380f4e12a05888f635caa9af4a7cf4 (diff)
Fix up some builtins
Diffstat (limited to 'builtins/bool.c')
-rw-r--r--builtins/bool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtins/bool.c b/builtins/bool.c
index 7614113f..e3d1f7ef 100644
--- a/builtins/bool.c
+++ b/builtins/bool.c
@@ -18,6 +18,7 @@ extern const void *SSS_HASH_VECTOR;
static CORD Bool_cord(const bool *b, bool colorize, const TypeInfo *type)
{
(void)type;
+ if (!b) return "Bool";
if (colorize)
return *b ? "\x1b[35myes\x1b[m" : "\x1b[35mno\x1b[m";
else
@@ -28,7 +29,6 @@ public struct {
TypeInfo type;
} Bool_type = {
.type={
- .name="Bool",
.size=sizeof(bool),
.align=alignof(bool),
.tag=CustomInfo,