diff --git a/src/pc/network/version.c b/src/pc/network/version.c index a266097d..6657e13f 100644 --- a/src/pc/network/version.c +++ b/src/pc/network/version.c @@ -3,7 +3,7 @@ #include "types.h" static char sVersionString[MAX_VERSION_LENGTH] = { 0 }; -static char sLocalVersionString[MAX_VERSION_LENGTH] = { 0 }; +static char sLocalVersionString[MAX_LOCAL_VERSION_LENGTH] = { 0 }; char* get_version(void) { snprintf(sVersionString, MAX_VERSION_LENGTH, "%s %d.%d", VERSION_TEXT, VERSION_NUMBER, MINOR_VERSION_NUMBER); @@ -11,6 +11,9 @@ char* get_version(void) { } char* get_version_local(void) { + if (PATCH_VERSION_NUMBER <= 0) { + return get_version(); + } snprintf(sLocalVersionString, MAX_LOCAL_VERSION_LENGTH, "%s %d.%d.%d", VERSION_TEXT, VERSION_NUMBER, MINOR_VERSION_NUMBER, PATCH_VERSION_NUMBER); return sLocalVersionString; } diff --git a/src/pc/network/version.h b/src/pc/network/version.h index e6f944ee..38900ce8 100644 --- a/src/pc/network/version.h +++ b/src/pc/network/version.h @@ -4,10 +4,10 @@ #define VERSION_TEXT "beta" #define VERSION_NUMBER 32 #define MINOR_VERSION_NUMBER 0 -#define PATCH_VERSION_NUMBER 2 +#define PATCH_VERSION_NUMBER 3 #define MAX_VERSION_LENGTH 10 -#define MAX_LOCAL_VERSION_LENGTH 12 +#define MAX_LOCAL_VERSION_LENGTH 11 char* get_version(void); char* get_version_local(void);