From 45b9cd9ce0004c317ebfd3ed62ac92abd3f72e2a Mon Sep 17 00:00:00 2001 From: meinname Date: Tue, 9 Apr 2019 12:52:36 +0200 Subject: [PATCH] Fix Jump if target is in line 1 --- RuriLib/LoliScript/LoliScript.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RuriLib/LoliScript/LoliScript.cs b/RuriLib/LoliScript/LoliScript.cs index 24b017f..b1d4a19 100644 --- a/RuriLib/LoliScript/LoliScript.cs +++ b/RuriLib/LoliScript/LoliScript.cs @@ -304,7 +304,7 @@ namespace RuriLib.LS try { label = LineParser.ParseToken(ref cfLine, TokenType.Label, true); - i = ScanFor(lines, 0, true, new string[] { $"{label}" }) - 1; + i = ScanFor(lines, -1, true, new string[] { $"{label}" }) - 1; data.LogBuffer.Add(new LogEntry($"Jumping to line {i + 1}", Colors.White)); } catch { throw new Exception($"No block with label {label} was found"); }