From 32e8aa10683128b9db1cf8b6e19f531e8d47ec5c Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 31 May 2025 11:19:46 -0400 Subject: [PATCH] more descriptive message in sfctool for outdated savefile --- util/sfctool.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/util/sfctool.c b/util/sfctool.c index f87976381..83b13884e 100644 --- a/util/sfctool.c +++ b/util/sfctool.c @@ -319,15 +319,29 @@ process_savefile(const char *srcfnam, enum saveformats srcstyle, cscbuf[5]); /* ptr */ if (sfstatus > SF_UPTODATE && ((sfstatus <= SF_CRITICAL_BYTE_COUNT_MISMATCH) || !unconvert)) { - fprintf(stderr, - "The %s savefile %s%s%s not compatible with this %s%sutility.\n", + if (sfstatus == SF_OUTDATED) { + fprintf(stderr, + "The %s savefile is outdated with respect to this %d.%d.%d EDITLEVEL %ld " + "%s%s%s.\n", + briefname(srcfnam), + VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL, + (long) EDITLEVEL, + thisdatamodel ? thisdatamodel : "", + thisdatamodel ? " " : "", + "sfctool"); + return 0; + } else { + fprintf(stderr, + "The %s savefile %s%s%s not compatible with this %s%s %s utility.\n", briefname(srcfnam), dmfile ? "is a " : "", dmfile ? dmfile : "", dmfile ? " savefile, thus" : " is", thisdatamodel ? thisdatamodel : "", - thisdatamodel ? " " : ""); - return 0; + thisdatamodel ? " " : "", + "sfctool"); + return 0; + } } if (sfstatus >= SF_DM_IL32LLP64_ON_ILP32LL64) { renidx = sfstatus - SF_DM_IL32LLP64_ON_ILP32LL64;