diff options
author | Robin Gareus <robin@gareus.org> | 2012-11-15 13:19:07 +0000 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2012-11-15 13:19:07 +0000 |
commit | a6968f8d2c4fb7f14f7897227ff0b22b94586f2a (patch) | |
tree | 3ab8817a9c7dfa84ccf6b0932fac72097d16bc20 /gtk2_ardour/audio_clock.cc | |
parent | 60f85cac42cdad6603869ffe9c2da9a8dc9a6f61 (diff) |
hotfix negative TC editing - problem was introduced in r13491
git-svn-id: svn://localhost/ardour2/branches/3.0@13506 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/audio_clock.cc')
-rw-r--r-- | gtk2_ardour/audio_clock.cc | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |