Check that there are a sufficient number of arguments for fish_pager

darcs-hash:20051012070351-ac50b-b1f72df88819e58542b00ba35cc5d75e125b9655.gz
This commit is contained in:
axel 2005-10-12 17:03:51 +10:00
parent 93293b3557
commit a3b8b0ab4b

View file

@ -57,7 +57,7 @@ enum
HIGHLIGHT_PAGER_DESCRIPTION, HIGHLIGHT_PAGER_DESCRIPTION,
HIGHLIGHT_PAGER_PROGRESS HIGHLIGHT_PAGER_PROGRESS
} }
; ;
/** /**
This struct should be continually updated by signals as the term This struct should be continually updated by signals as the term
@ -946,8 +946,12 @@ int main( int argc, char **argv )
init(); init();
if( argc < 3 )
{
debug( 0, L"Insufficient arguments" );
}
else
{
prefix = str2wcs( argv[2] ); prefix = str2wcs( argv[2] );
is_quoted = strcmp( "1", argv[1] )==0; is_quoted = strcmp( "1", argv[1] )==0;
@ -985,7 +989,7 @@ int main( int argc, char **argv )
fwprintf( out_file, L"%ls", (wchar_t *)out_buff.buff ); fwprintf( out_file, L"%ls", (wchar_t *)out_buff.buff );
if( is_ca_mode ) if( is_ca_mode )
writembs(exit_ca_mode); writembs(exit_ca_mode);
}
destroy(); destroy();
} }