about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--040brace.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/040brace.cc b/040brace.cc
index 71324aaa..9429fe1a 100644
--- a/040brace.cc
+++ b/040brace.cc
@@ -59,6 +59,10 @@ void transform_braces(const recipe_ordinal r) {
       continue;
     }
     if (inst.label == "}") {
+      if (open_braces.empty()) {
+        raise << "missing '{' in " << Recipe[r].name << '\n';
+        return;
+      }
       open_braces.pop();
       continue;
     }