mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-23 19:31:44 +00:00
Single-digit values followed by 's' were not recognized as a valid unit with number.
This commit is contained in:
parent
09551a3f94
commit
18d1ab995f
@ -378,7 +378,7 @@ parse_number_with_unit(const string &s,
|
||||
if (display_s == "")
|
||||
display_s = s;
|
||||
|
||||
if (s.length() < 3)
|
||||
if (s.length() < 2)
|
||||
mxerror(_("'%s' is not a valid %s in '%s %s'.\n"),
|
||||
s.c_str(), subject.c_str(), argument.c_str(), display_s.c_str());
|
||||
|
||||
@ -399,6 +399,10 @@ parse_number_with_unit(const string &s,
|
||||
"in '%s %s'.\n"), s.c_str(), argument.c_str(),
|
||||
display_s.c_str());
|
||||
|
||||
if (s.length() < (unit_length + 1))
|
||||
mxerror(_("'%s' is not a valid %s in '%s %s'.\n"),
|
||||
s.c_str(), subject.c_str(), argument.c_str(), display_s.c_str());
|
||||
|
||||
if (!parse_int(s.substr(0, s.length() - unit_length), value))
|
||||
mxerror(_("'%s' does not contain a valid number in front of the unit in "
|
||||
"'%s %s'.\n"), s.c_str(), argument.c_str(), display_s.c_str());
|
||||
|
Loading…
Reference in New Issue
Block a user