From a4933e5cc9865a2c18fbbed11e6060f7c5913b09 Mon Sep 17 00:00:00 2001 From: Mikayla Hutchinson Date: Tue, 11 Jul 2023 18:57:34 -0400 Subject: [PATCH] Fix maximum position for spine parser recovery This was causing all sorts of annoying and sometimes nondeterministic problems, as it depended on the difference between the last parsed snapshot and the current snapshot. --- Editor/Parsing/XmlBackgroundParser.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Editor/Parsing/XmlBackgroundParser.cs b/Editor/Parsing/XmlBackgroundParser.cs index 286f665..a1a224b 100644 --- a/Editor/Parsing/XmlBackgroundParser.cs +++ b/Editor/Parsing/XmlBackgroundParser.cs @@ -60,7 +60,7 @@ static int MaximumCompatiblePosition (ITextSnapshot snapshotA, ITextSnapshot sna while (newVersion.VersionNumber != oldVersion.VersionNumber) { if (oldVersion.Changes != null) { foreach (var change in oldVersion.Changes) { - if (change.OldPosition > position) { + if (change.OldPosition < position) { position = change.OldPosition; break; }