1
0
Fork 0

Merging upstream version 1.12~rc1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-24 06:02:28 +01:00
parent 411f37263d
commit d5110769e8
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
29 changed files with 1120 additions and 662 deletions

View file

@ -54,11 +54,13 @@ void parse_format_types2( const std::string & arg, const char * const pn,
int format_types[2] )
{
const unsigned i = std::min( arg.find( ',' ), arg.size() );
if( i > 0 ) format_types[0] = parse_format_type( arg.substr( 0, i ), pn );
else format_types[0] = -1;
if( i + 1 < arg.size() ) format_types[1] =
parse_format_type( arg.substr( i + 1 ), pn );
else format_types[1] = -1;
if( i != std::min( arg.rfind( ',' ), arg.size() ) )
{ show_option_error( arg.c_str(), "Too many formats in", pn );
std::exit( 1 ); }
format_types[0] =
( i > 0 ) ? parse_format_type( arg.substr( 0, i ), pn ) : -1;
format_types[1] =
( i + 1 < arg.size() ) ? parse_format_type( arg.substr( i + 1 ), pn ) : -1;
}