File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2145,20 +2145,20 @@ void set_spectate_marine_order( const CCommand &args )
21452145 int8_t iProfiles[ASW_NUM_MARINE_PROFILES ];
21462146
21472147 // parse input
2148- for ( size_t i = 1 ; i <= ASW_NUM_MARINE_PROFILES ; i++ )
2148+ for ( size_t i = 0 ; i < ASW_NUM_MARINE_PROFILES ; i++ )
21492149 {
2150- const int iProfile = atoi ( args[i] );
2150+ const int iProfile = atoi ( args[i + 1 ] );
21512151
21522152 if ( iProfile < 0 || iProfile >= ASW_NUM_MARINE_PROFILES )
21532153 {
2154- Warning ( " marine_order: Incorrect profile number (#%d: %s)\n " , i, args[i] );
2154+ Warning ( " marine_order: Incorrect profile number (#%d: %s)\n " , i + 1 , args[i + 1 ] );
21552155 return ;
21562156 }
21572157
21582158 for ( size_t j = 0 ; j < i; j++ ){
21592159 if ( iProfiles[j] == iProfile )
21602160 {
2161- Warning ( " marine_order: Double profile number (%d: %d)\n " , i, iProfile );
2161+ Warning ( " marine_order: Double profile number (%d: %d)\n " , i + 1 , iProfile );
21622162 return ;
21632163 }
21642164 }
You can’t perform that action at this time.
0 commit comments