diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-08-17 15:19:08 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-08-17 15:20:25 +0200 |
commit | 650385128d0e31777e51d2bc9c1f79f15e966cd8 (patch) | |
tree | 594407176cc1c149c430a2289df497144a36a9c7 | |
parent | c22d1dfba82475d19896c04bd1c217677a97ad6e (diff) |
MLKCons: Do not crash when displaying a cons whose cdr is a fixnum.
-rw-r--r-- | MLKCons.m | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -146,7 +146,7 @@ if (!_cdr) return [NSString stringWithFormat:@"%@", MLKPrintToString(_car)]; - else if ([_cdr isKindOfClass:[MLKCons class]]) + else if (MLKInstanceP (_cdr) && [_cdr isKindOfClass:[MLKCons class]]) return [NSString stringWithFormat:@"%@ %@", MLKPrintToString(_car), [_cdr bareDescriptionForLisp]]; @@ -158,7 +158,7 @@ -(NSString *)descriptionForLisp { - if ([_cdr isKindOfClass:[MLKCons class]]) + if (MLKInstanceP (_cdr) && [_cdr isKindOfClass:[MLKCons class]]) { if (_car == [[MLKPackage findPackage:@"COMMON-LISP"] intern:@"QUOTE"]) return [NSString stringWithFormat:@"'%@", [_cdr bareDescriptionForLisp]]; |