From e3b8540b7dcd4774d5e43f9702cc6430b4baa45c Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 22 Feb 2010 02:22:24 -0500 Subject: [PATCH] Fixed pop_scope(). --- mojoshader_compiler.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mojoshader_compiler.c b/mojoshader_compiler.c index 1c3eab98..ad27b4d8 100644 --- a/mojoshader_compiler.c +++ b/mojoshader_compiler.c @@ -643,9 +643,12 @@ static void push_scope(Context *ctx) static void pop_scope(Context *ctx) { UserTypeMap *map = &ctx->usertypes; - assert(map->scope != NULL); while ((map->scope) && (map->scope->symbol)) pop_usertype(ctx); + + assert(map->scope != NULL); + assert(map->scope->symbol == NULL); + pop_usertype(ctx); } // push_scope static void destroy_usertypemap(Context *ctx)