Apply bounds checking to AssTimes generated from strings

Originally committed to SVN as r6564.
This commit is contained in:
Thomas Goyne 2012-03-11 23:04:56 +00:00
parent 43f461e846
commit 1d4c0c0712

View file

@ -72,6 +72,9 @@ AssTime::AssTime(wxString const& text)
// Milliseconds (includes seconds)
time += AegiStringToFix(text, 3, end, text.size());
// Limit to the valid range
time = mid(0, time, 10 * 60 * 60 * 1000 - 1);
}
wxString AssTime::GetASSFormated(bool msPrecision) const {