mirror of
https://github.com/nasa/trick.git
synced 2025-06-22 08:50:06 +00:00
Invoking trick-ICG without any arguments results in a Segmentation fault
ICG dies on a strdup if the the input file is empty. Added a check for an empty input file name. We exit with an error message if there is no input file given. refs #229
This commit is contained in:
@ -88,6 +88,11 @@ int main( int argc , char * argv[] ) {
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
if ( input_file_names.empty() ) {
|
||||
std::cerr << "No header file specified" << std::endl ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
ci.createDiagnostics();
|
||||
clang::DiagnosticOptions & diago = ci.getDiagnosticOpts() ;
|
||||
diago.ShowColors = 1 ;
|
||||
|
Reference in New Issue
Block a user