'demo -s' would crash due to a missing argument on Fl::fatal()

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4432 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2005-07-18 13:08:09 +00:00
parent 42d5b7f036
commit d1808c6165

View File

@ -328,7 +328,7 @@ int main(int argc, char **argv) {
const char *fname = buf; const char *fname = buf;
int i = 0; int i = 0;
if (!Fl::args(argc,argv,i) || i < argc-1) if (!Fl::args(argc,argv,i) || i < argc-1)
Fl::fatal("Usage: %s <switches> <menufile>\n%s",Fl::help); Fl::fatal("Usage: %s <switches> <menufile>\n%s",argv[0],Fl::help);
if (i < argc) fname = argv[i]; if (i < argc) fname = argv[i];
if (!load_the_menu(fname)) Fl::fatal("Can't open %s",fname); if (!load_the_menu(fname)) Fl::fatal("Can't open %s",fname);