From 474039de7af2cee7fa309e06a5c4e75b81f220ad Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Thu, 31 Jul 2025 13:41:29 +0200 Subject: Fixed table name in tools --- tools/301_solve_file/solve_file.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tools/301_solve_file') diff --git a/tools/301_solve_file/solve_file.c b/tools/301_solve_file/solve_file.c index a1277e3..a8f0925 100644 --- a/tools/301_solve_file/solve_file.c +++ b/tools/301_solve_file/solve_file.c @@ -38,7 +38,8 @@ void run(void) { } int main(int argc, char **argv) { - char filename[255], dataid[NISSY_SIZE_DATAID], *scrfilename; + char filename[7+NISSY_SIZE_DATAID], dataid[NISSY_SIZE_DATAID]; + char *scrfilename; FILE *scrfile; if (argc < 3) { @@ -60,12 +61,11 @@ int main(int argc, char **argv) { srand(time(NULL)); nissy_setlogger(log_stderr, NULL); - sprintf(filename, "tables/%s", solver); + size = nissy_solverinfo(solver, dataid); + sprintf(filename, "tables/%s", dataid); if (getdata(solver, &buf, filename) != 0) return 1; - size = nissy_solverinfo(solver, dataid); - if ((scrfile = fopen(scrfilename, "r")) == NULL) { printf("Error: could not read given file '%s'.\n", scrfilename); -- cgit v1.3