commit a36edab98434100422550d7271e54a723350ee38
parent 87ceabfa27c3b914cf15d61cbb5efce7904f0d1b
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date: Fri, 18 Jul 2025 17:04:53 +0200
Fix shell return value on solverinfo
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/shell/shell.c b/shell/shell.c
@@ -282,9 +282,12 @@ solverinfo_exec(args_t *args)
char buf[NISSY_SIZE_DATAID];
ret = nissy_solverinfo(args->str_solver, buf);
- if (ret < 0)
+ if (ret < 0) {
fprintf(stderr, "Unknown error (make sure solver is valid)\n");
- printf("%" PRId64 "\n%s\n", ret, buf);
+ } else {
+ printf("%" PRId64 "\n%s\n", ret, buf);
+ ret = 0;
+ }
return ret;
}