From 6e36a897d0ae139e9dfcf7549797a7b9b89238e3 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Tue, 27 Mar 2012 23:15:20 +0000 Subject: [PATCH] Don't allow dragging audio markers to negative times As ASS doesn't support negative times, some of the other code assumes that times are >= 0, and it's never actually useful to have a negative start time. Originally committed to SVN as r6623. --- aegisub/src/audio_timing_dialogue.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aegisub/src/audio_timing_dialogue.cpp b/aegisub/src/audio_timing_dialogue.cpp index 5ee64b02d..aea983a18 100644 --- a/aegisub/src/audio_timing_dialogue.cpp +++ b/aegisub/src/audio_timing_dialogue.cpp @@ -815,6 +815,9 @@ std::vector AudioTimingControllerDialogue::GetRightMarkers() int AudioTimingControllerDialogue::SnapPosition(int position, int snap_range, std::vector const& exclude) const { + if (position < 0) + position = 0; + if (snap_range <= 0) return position;