- // If a state has been specified, then load that
- if (loadst) {
- StatesC = loadst - 1;
- char *state_filename = get_state_filename(StatesC);
- LoadState(state_filename);
- free(state_filename);
- }
+ // If a state has been specified, then load that
+ if (loadst) {
+ StatesC = loadst - 1;
+ char *state_filename = get_state_filename(StatesC);
+ int ret = LoadState(state_filename);
+ printf("%s state %s\n", ret ? "failed to load" : "loaded", state_filename);
+ free(state_filename);
+ }