From 6034ff515d15dba65e9725320f69f6346125998d Mon Sep 17 00:00:00 2001 From: Tim Felgentreff Date: Tue, 8 Dec 2015 12:01:52 +0100 Subject: [PATCH] fix genversion if not running in git repo --- tools/genversion.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/genversion.cpp b/tools/genversion.cpp index c74368663..ec361b35f 100644 --- a/tools/genversion.cpp +++ b/tools/genversion.cpp @@ -87,9 +87,6 @@ int main(int argc, char * argv[]) { } } - if ( memcmp(old_ver, new_ver, sizeof(old_ver)) == 0 ) - return 0; - file = fopen(argv[1], "w"); if ( ! file ) return 1; @@ -101,7 +98,7 @@ int main(int argc, char * argv[]) { fprintf(file, "#define StratagusPatchLevel %d\n", new_ver[2]); fprintf(file, "#define StratagusPatchLevel2 %d\n", new_ver[3]); - if ( new_ver[4] ) + if ( new_ver[4] != -1 ) fprintf(file, "#define StratagusGitRev %s\n", git_rev); fclose(file);