summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <mulk@minimulk.mst-plus>2008-10-01 16:44:43 +0200
committerMatthias Benkard <mulk@minimulk.mst-plus>2008-10-01 16:44:43 +0200
commit8f594f969b0c495b098c833dba26d5cad93f7cd8 (patch)
tree8ab8937210e62f5578693918833796fb79fa15f6
parent8c28cc5aaeeb3546e4c113734e18285699bf779e (diff)
MLKSplitDeclarationsDocAndForms: Don't crash if the body starts with a fixnum.
-rw-r--r--functions.m7
1 files changed, 4 insertions, 3 deletions
diff --git a/functions.m b/functions.m
index a884c40..3c0c2f9 100644
--- a/functions.m
+++ b/functions.m
@@ -196,9 +196,10 @@ void MLKSplitDeclarationsDocAndForms (id *decls, id *doc, id *forms, id body, BO
*doc = nil;
declarations = nil;
- while (([[body car] isKindOfClass:[MLKCons class]]
- && [[body car] car] == DECLARE)
- || (docp && [[body car] isKindOfClass:[NSString class]]))
+ while (MLKInstanceP ([body car])
+ && (([[body car] isKindOfClass:[MLKCons class]]
+ && [[body car] car] == DECLARE)
+ || (docp && [[body car] isKindOfClass:[NSString class]])))
{
id thing = [body car];