From 2c324de29cd0d81401f624e6cfe9564249cb628c Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Thu, 22 Dec 2011 21:30:14 +0000 Subject: [PATCH] Fix use of an uninitialized value in the time edit control when the frame number can't be parsed Originally committed to SVN as r6131. --- aegisub/src/timeedit_ctrl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aegisub/src/timeedit_ctrl.cpp b/aegisub/src/timeedit_ctrl.cpp index aa69b2e70..a99a9e44d 100644 --- a/aegisub/src/timeedit_ctrl.cpp +++ b/aegisub/src/timeedit_ctrl.cpp @@ -115,9 +115,9 @@ void TimeEdit::SetByFrame(bool enableByFrame) { void TimeEdit::OnModified(wxCommandEvent &event) { event.Skip(); if (byFrame) { - long temp; + long temp = 0; GetValue().ToLong(&temp); - SetTime(c->videoController->TimeAtFrame(temp, isEnd ? agi::vfr::END : agi::vfr::START)); + time = c->videoController->TimeAtFrame(temp, isEnd ? agi::vfr::END : agi::vfr::START); } else if (insert) time.ParseASS(GetValue());