mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
(libT) let tr_getopt() support short options' arguments to be embedded, such as -p51413
This commit is contained in:
@@ -136,8 +136,9 @@ findOption( const tr_option * opts,
|
||||
return o;
|
||||
}
|
||||
len = strlen( o->shortName );
|
||||
if( !memcmp( o->shortName, str+1, len ) && str[len+1]=='=' ) {
|
||||
if( nested ) *nested = str+len+2;
|
||||
if( !memcmp( o->shortName, str+1, len ) ) {
|
||||
if( nested )
|
||||
*nested = str[len+1]=='=' ? str+len+2 : str+len+1;
|
||||
return o;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user