Browse Source

add a warning if file with modified parameters has not been found.

Then ignore the altermod command.
pre-master-46
Holger Vogt 6 years ago
parent
commit
55f3776fc1
  1. 8
      src/frontend/device.c

8
src/frontend/device.c

@ -1403,7 +1403,15 @@ com_alter_mod(wordlist *wl)
} }
filename = copy(eqword); filename = copy(eqword);
} }
modfile = inp_pathopen(filename, readmode); modfile = inp_pathopen(filename, readmode);
if (modfile == NULL) {
fprintf(cp_err, "Warning: Could not open file %s, altermod ignored\n", filename);
tfree(input);
tfree(filename);
return;
}
{ {
char *dir_name = ngdirname(filename); char *dir_name = ngdirname(filename);
modeldeck = inp_readall(modfile, dir_name, 0, 0, NULL); modeldeck = inp_readall(modfile, dir_name, 0, 0, NULL);

Loading…
Cancel
Save