Fixed pop_scope().
authorRyan C. Gordon <icculus@icculus.org>
Mon, 22 Feb 2010 02:22:24 -0500
changeset 850 473108b0366d
parent 849 91f88707edbe
child 851 e3830e2e67d3
Fixed pop_scope().
mojoshader_compiler.c
--- a/mojoshader_compiler.c	Mon Feb 22 02:22:06 2010 -0500
+++ b/mojoshader_compiler.c	Mon Feb 22 02:22:24 2010 -0500
@@ -643,9 +643,12 @@
 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)