From 2402978c3a0ec519d676e92e9d545d9d9a35ec9c Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Thu, 14 Jan 2016 14:22:23 -0800 Subject: [PATCH] Fix #205 --- src/dfmt/formatter.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dfmt/formatter.d b/src/dfmt/formatter.d index 27e762d..3315aa8 100644 --- a/src/dfmt/formatter.d +++ b/src/dfmt/formatter.d @@ -227,7 +227,7 @@ private: int depth = 1; formatStep(); inAsm = true; - while (index < tokens.length) + while (index < tokens.length && depth > 0) { if (currentIs(tok!"{")) ++depth;