From 85ee881e611058e41e7dd7bc9cacfb7933f6778b Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 27 Jul 2008 11:13:20 +0200 Subject: MLKCons: Fix NIL printing for list tails. --- MLKCons.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'MLKCons.m') diff --git a/MLKCons.m b/MLKCons.m index 7ed6d1c..6b6cc8b 100644 --- a/MLKCons.m +++ b/MLKCons.m @@ -100,7 +100,8 @@ -(NSString *)bareDescriptionForLisp { if (!_cdr) - return [NSString stringWithFormat:@"%@", [_car descriptionForLisp]]; + return [NSString stringWithFormat:@"%@", + (_car ? (id)[_car descriptionForLisp] : (id)@"()")]; else if ([_cdr isKindOfClass:[MLKCons class]]) return [NSString stringWithFormat:@"%@ %@", (_car ? (id)[_car descriptionForLisp] : (id)@"()"), -- cgit v1.2.3