- Fixed sometimes retrieving the svn-version with fopen not doing a fclose afterwards.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10191 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
6caae988d5
commit
87ac06f325
@ -148,7 +148,6 @@ const char* get_svn_revision(void)
|
|||||||
// XML File format
|
// XML File format
|
||||||
while (fgets(line,sizeof(line),fp))
|
while (fgets(line,sizeof(line),fp))
|
||||||
if (strstr(line,"revision=")) break;
|
if (strstr(line,"revision=")) break;
|
||||||
fclose(fp);
|
|
||||||
if (sscanf(line," %*[^\"]\"%d%*[^\n]", &rev) == 1) {
|
if (sscanf(line," %*[^\"]\"%d%*[^\n]", &rev) == 1) {
|
||||||
snprintf(eA_svn_version, sizeof(eA_svn_version), "%d", rev);
|
snprintf(eA_svn_version, sizeof(eA_svn_version), "%d", rev);
|
||||||
}
|
}
|
||||||
@ -164,6 +163,7 @@ const char* get_svn_revision(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
fclose(fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!(*eA_svn_version))
|
if(!(*eA_svn_version))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user