From a6968f8d2c4fb7f14f7897227ff0b22b94586f2a Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 15 Nov 2012 13:19:07 +0000 Subject: hotfix negative TC editing - problem was introduced in r13491 git-svn-id: svn://localhost/ardour2/branches/3.0@13506 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/audio_clock.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gtk2_ardour') diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc index 2dfdf77272..0d34e2fe25 100644 --- a/gtk2_ardour/audio_clock.cc +++ b/gtk2_ardour/audio_clock.cc @@ -1925,8 +1925,8 @@ AudioClock::timecode_validate_edit (const string&) int hours; char ignored[2]; - if (sscanf (_layout->get_text().c_str(), "%" PRId32 ":%" PRId32 ":%" PRId32 "%[:;]%" PRId32, - &hours, &TC.minutes, &TC.seconds, ignored, &TC.frames) != 5) { + if (sscanf (_layout->get_text().c_str(), "%[- _]%" PRId32 ":%" PRId32 ":%" PRId32 "%[:;]%" PRId32, + ignored, &hours, &TC.minutes, &TC.seconds, ignored, &TC.frames) != 6) { return false; } @@ -1987,7 +1987,7 @@ AudioClock::frames_from_timecode_string (const string& str) const char ignored[2]; int hours; - if (sscanf (str.c_str(), "%d:%d:%d%[:;]%d", &hours, &TC.minutes, &TC.seconds, ignored, &TC.frames) != 5) { + if (sscanf (str.c_str(), "%[- _]%d:%d:%d%[:;]%d", ignored, &hours, &TC.minutes, &TC.seconds, ignored, &TC.frames) != 6) { error << string_compose (_("programming error: %1 %2"), "badly formatted timecode clock string", str) << endmsg; return 0; } -- cgit v1.2.3