Ver código fonte

- 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
skotlex 18 anos atrás
pai
commit
87ac06f325
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      src/common/core.c

+ 1 - 1
src/common/core.c

@@ -148,7 +148,6 @@ const char* get_svn_revision(void)
 				// XML File format
 				while (fgets(line,sizeof(line),fp))
 					if (strstr(line,"revision=")) break;
-				fclose(fp);
 				if (sscanf(line," %*[^\"]\"%d%*[^\n]", &rev) == 1) {
 					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))