Browse Source

Merge pull request #336 from FungusGames/indent-level-308

Fixed End command indents when not matched with an If #308
master
Chris Gregan 9 years ago
parent
commit
aa049a22ce
  1. 6
      Assets/Fungus/Flowchart/Editor/BlockEditor.cs

6
Assets/Fungus/Flowchart/Editor/BlockEditor.cs

@ -418,7 +418,11 @@ namespace Fungus
{ {
indentLevel--; indentLevel--;
} }
command.indentLevel = Math.Max(indentLevel, 0);
// Negative indent level is not permitted
indentLevel = Math.Max(indentLevel, 0);
command.indentLevel = indentLevel;
if (command.OpenBlock()) if (command.OpenBlock())
{ {

Loading…
Cancel
Save