diff options
author | Matthias Benkard <mulk@minimulk.mst-plus> | 2008-10-01 16:44:43 +0200 |
---|---|---|
committer | Matthias Benkard <mulk@minimulk.mst-plus> | 2008-10-01 16:44:43 +0200 |
commit | 8f594f969b0c495b098c833dba26d5cad93f7cd8 (patch) | |
tree | 8ab8937210e62f5578693918833796fb79fa15f6 | |
parent | 8c28cc5aaeeb3546e4c113734e18285699bf779e (diff) |
MLKSplitDeclarationsDocAndForms: Don't crash if the body starts with a fixnum.
-rw-r--r-- | functions.m | 7 |
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]; |