fix genversion if not running in git repo

This commit is contained in:
Tim Felgentreff 2015-12-08 12:01:52 +01:00
parent 4fb42250d3
commit 6034ff515d

View file

@ -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);