Loading lib_util/cmdln_parser.c +16 −1 Original line number Diff line number Diff line Loading @@ -151,7 +151,22 @@ static int8_t optionMatchesString( const char *optionName = stringToOptionName( str ); #ifdef FIX_923_EXTERNAL_REND_COMMAND_LINE if ( strncmp( to_upper( (char *) optionName ), to_upper( (char *) opt.props.match ), MAX_OPTION_LENGTH ) == 0 || strncmp( to_upper( (char *) optionName ), to_upper( (char *) opt.props.matchShort ), MAX_OPTION_LENGTH ) == 0 ) char optionName_to_upper[FILENAME_MAX]; strncpy( optionName_to_upper, optionName, sizeof( optionName_to_upper ) - 1 ); optionName_to_upper[sizeof( optionName_to_upper ) - 1] = '\0'; to_upper( optionName_to_upper ); char match_to_upper[FILENAME_MAX]; strncpy( match_to_upper, opt.props.match, sizeof( match_to_upper ) - 1 ); optionName_to_upper[sizeof( match_to_upper ) - 1] = '\0'; to_upper( match_to_upper ); char matchShort_to_upper[FILENAME_MAX]; strncpy( matchShort_to_upper, opt.props.matchShort, sizeof( matchShort_to_upper ) - 1 ); optionName_to_upper[sizeof( matchShort_to_upper ) - 1] = '\0'; to_upper( matchShort_to_upper ); if ( strncmp( optionName_to_upper, match_to_upper, MAX_OPTION_LENGTH ) == 0 || strncmp( optionName_to_upper, matchShort_to_upper, MAX_OPTION_LENGTH ) == 0 ) #else if ( strncmp( optionName, opt.props.match, MAX_OPTION_LENGTH ) == 0 || strncmp( optionName, opt.props.matchShort, MAX_OPTION_LENGTH ) == 0 ) #endif Loading Loading
lib_util/cmdln_parser.c +16 −1 Original line number Diff line number Diff line Loading @@ -151,7 +151,22 @@ static int8_t optionMatchesString( const char *optionName = stringToOptionName( str ); #ifdef FIX_923_EXTERNAL_REND_COMMAND_LINE if ( strncmp( to_upper( (char *) optionName ), to_upper( (char *) opt.props.match ), MAX_OPTION_LENGTH ) == 0 || strncmp( to_upper( (char *) optionName ), to_upper( (char *) opt.props.matchShort ), MAX_OPTION_LENGTH ) == 0 ) char optionName_to_upper[FILENAME_MAX]; strncpy( optionName_to_upper, optionName, sizeof( optionName_to_upper ) - 1 ); optionName_to_upper[sizeof( optionName_to_upper ) - 1] = '\0'; to_upper( optionName_to_upper ); char match_to_upper[FILENAME_MAX]; strncpy( match_to_upper, opt.props.match, sizeof( match_to_upper ) - 1 ); optionName_to_upper[sizeof( match_to_upper ) - 1] = '\0'; to_upper( match_to_upper ); char matchShort_to_upper[FILENAME_MAX]; strncpy( matchShort_to_upper, opt.props.matchShort, sizeof( matchShort_to_upper ) - 1 ); optionName_to_upper[sizeof( matchShort_to_upper ) - 1] = '\0'; to_upper( matchShort_to_upper ); if ( strncmp( optionName_to_upper, match_to_upper, MAX_OPTION_LENGTH ) == 0 || strncmp( optionName_to_upper, matchShort_to_upper, MAX_OPTION_LENGTH ) == 0 ) #else if ( strncmp( optionName, opt.props.match, MAX_OPTION_LENGTH ) == 0 || strncmp( optionName, opt.props.matchShort, MAX_OPTION_LENGTH ) == 0 ) #endif Loading