From 76c93f4be273fafa5d817d455f282023b0fa02c3 Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Sun, 28 Apr 2013 18:44:58 +0000 Subject: [PATCH] Slight fix --- parser.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/parser.c b/parser.c index 61884ac..0186b8a 100644 --- a/parser.c +++ b/parser.c @@ -141,7 +141,7 @@ bool gmqcc_compiler_attachcontext(gmqcc_compiler_t *c, void *base, gmqcc_compile */ if (c->ctx_parser) c->ctx_parser->code = c->ctx_code; - break; + return true; case GMQCC_CONTEXT_PARSER: /* Free memory */ @@ -154,19 +154,16 @@ bool gmqcc_compiler_attachcontext(gmqcc_compiler_t *c, void *base, gmqcc_compile c->ctx_parser = (struct parser_s*)base; c->ctx_parser->code = c->ctx_code; - break; + return true; case GMQCC_CONTEXT_PREPROCESSOR: if (c->ctx_preprocess) gmqcc_preprocess_destroy(c->ctx_preprocess); c->ctx_preprocess = (struct gmqcc_preprocess_s*)base; - break; - - default: - gmqcc_global_error("Invalid context attachment"); - return false; + return true; } - return true; + gmqcc_global_error("Invalid context attachment"); + return false; } static ast_expression * const intrinsic_debug_typestring = (ast_expression*)0x1; -- 2.39.2