From 58c7bbd78a0bdff7d7c1cce3bfaeb822e82a11b8 Mon Sep 17 00:00:00 2001
From: Thomas Goyne <plorkyeran@aegisub.org>
Date: Sun, 8 Jan 2012 01:35:18 +0000
Subject: [PATCH] Sort inactive markers so that lower_bound will actually work
 when lines are out of order or overlapping

Originally committed to SVN as r6238.
---
 aegisub/src/audio_timing_dialogue.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/aegisub/src/audio_timing_dialogue.cpp b/aegisub/src/audio_timing_dialogue.cpp
index 58e4b3717..d6d638c00 100644
--- a/aegisub/src/audio_timing_dialogue.cpp
+++ b/aegisub/src/audio_timing_dialogue.cpp
@@ -582,6 +582,7 @@ void AudioTimingControllerDialogue::RegenerateInactiveLines()
 					context->audioController->SamplesFromMilliseconds(line->End), false));
 			}
 		}
+		sort(inactive_markers.begin(), inactive_markers.end());
 		break;
 	}
 	default: