summaryrefslogtreecommitdiff
path: root/mainwin.cc
diff options
context:
space:
mode:
Diffstat (limited to 'mainwin.cc')
-rw-r--r--mainwin.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/mainwin.cc b/mainwin.cc
index 86c37ed..352c62d 100644
--- a/mainwin.cc
+++ b/mainwin.cc
@@ -265,12 +265,13 @@ void MainWindow::actionCompile()
root_norm_term = root_raw_term->link();
- CSGTerm *n;
- do {
- n = root_norm_term->normalize();
+ while (1) {
+ CSGTerm *n = root_norm_term->normalize();
root_norm_term->unlink();
+ if (root_norm_term == n)
+ break;
root_norm_term = n;
- } while (root_norm_term != n);
+ }
if (!root_norm_term) {
console->append("Compilation failed!");
contact: Jan Huwald // Impressum