]> git.mdlowis.com Git - proto/sclpl.git/commitdiff
fixed segfault on osx
authorMichael D. Lowis <mike@mdlowis.com>
Wed, 15 Oct 2014 01:47:07 +0000 (21:47 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Wed, 15 Oct 2014 01:47:07 +0000 (21:47 -0400)
source/sclpl/parser.c

index 5bbf9e514fbfc79ec872dd7d61e304de00fb15f3..5202b934600e853c8f82e20c94c09b4582403da8 100644 (file)
@@ -62,7 +62,7 @@ bool parser_eof(parser_t* p_parser) {
 }
 
 void parser_resume(parser_t* p_parser) {
-    if (NULL != p_parser->p_tok) {
+    if ((NULL != p_parser->p_tok) && (&tok_eof != p_parser->p_tok)) {
         mem_release(p_parser->p_tok);
         p_parser->p_tok = NULL;
     }