Improve version mismatch error
The error message now spells out the entire client and server version string, so they can be visually inspected for discrepancies.
This commit is contained in:
parent
bad402578d
commit
b4701b6c91
1 changed files with 10 additions and 4 deletions
|
|
@ -398,10 +398,16 @@ int main(int argc, char *argv[])
|
|||
// Make sure our Choccolate Doom and midiproc version are lined up.
|
||||
if (strcmp(PACKAGE_STRING, argv[1]) != 0)
|
||||
{
|
||||
MessageBox(NULL, TEXT("It appears that the version of ")
|
||||
TEXT(PACKAGE_NAME) TEXT(" and ") TEXT(PROGRAM_PREFIX)
|
||||
TEXT("midiproc are out of sync. Please reinstall ")
|
||||
TEXT(PACKAGE_NAME) TEXT("."),
|
||||
char message[1024];
|
||||
snprintf(message, sizeof(message),
|
||||
"It appears that the version of %s and %smidiproc are out of "
|
||||
" sync. Please reinstall %s.\r\n\r\n"
|
||||
"Server Version: %s\r\nClient Version: %s",
|
||||
PACKAGE_NAME, PROGRAM_PREFIX, PACKAGE_NAME,
|
||||
PACKAGE_STRING, argv[1]);
|
||||
message[sizeof(message) - 1] = '\0';
|
||||
|
||||
MessageBox(NULL, TEXT(message),
|
||||
TEXT(PACKAGE_STRING), MB_OK | MB_ICONASTERISK);
|
||||
|
||||
return EXIT_FAILURE;
|
||||
|
|
|
|||
Loading…
Reference in a new issue