Be liberal about what to accept
This addressee a bug where ardour 6 was able to write negative duration `length="-1"` `length-beats="-3.3650500597559585e-05"` Ideally timecnt_t::string_to should check for invalid, negative, duration. But this also catches a more generic case. ``` exception at str.substr (1) #3 Temporal::timepos_t::string_to (this=0x7fffffff7bb0, str="") at libs/temporal/timeline.cc:904 #4 Temporal::timecnt_t::string_to (this=0x7fffffff7ba0, str="-2") at libs/temporal/timeline.cc:294 #5 PBD::string_to<Temporal::timecnt_t> (str="-2") at libs/ardour/ardour/types_convert.h:131 ```
This commit is contained in:
parent
31cf2dfa1b
commit
23010a910d
@ -280,6 +280,8 @@ timecnt_t::string_to (std::string const & str)
|
||||
ss >> ticks;
|
||||
_distance = int62_t (true, ticks);
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
/* eat separator character */
|
||||
|
Loading…
Reference in New Issue
Block a user