summaryrefslogtreecommitdiff
path: root/src/char/inter.c
diff options
context:
space:
mode:
authorglighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-24 13:29:13 +0000
committerglighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-24 13:29:13 +0000
commite0d8dee7204e565febf8d651cdc7c04bdfa913e8 (patch)
treed3c59a1d300a459a99043520c0b996ac7d778c74 /src/char/inter.c
parent913fd65ef9a5fa55ebbd5ac4502f72895879fc84 (diff)
downloadhercules-e0d8dee7204e565febf8d651cdc7c04bdfa913e8.tar.gz
hercules-e0d8dee7204e565febf8d651cdc7c04bdfa913e8.tar.bz2
hercules-e0d8dee7204e565febf8d651cdc7c04bdfa913e8.tar.xz
hercules-e0d8dee7204e565febf8d651cdc7c04bdfa913e8.zip
-Fix geoipreading cache for Windows, bugreport:6923
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16960 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char/inter.c')
-rw-r--r--src/char/inter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/char/inter.c b/src/char/inter.c
index 8ae147d5f..8863b41d8 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -378,10 +378,10 @@ const char * geoip_countryname[253] = {"Unknown","Asia/Pacific Region","Europe",
unsigned char *geoip_cache;
void geoip_readdb(void){
struct stat bufa;
- FILE *db=fopen("./db/GeoIP.dat","r");
+ FILE *db=fopen("./db/GeoIP.dat","rb");
fstat(fileno(db), &bufa);
geoip_cache = (unsigned char *) malloc(sizeof(unsigned char) * bufa.st_size);
- if(fread(geoip_cache, sizeof(unsigned char), bufa.st_size, db) != bufa.st_size) { ShowError("geoip_cache reading didn't read all elements"); }
+ if(fread(geoip_cache, sizeof(unsigned char), bufa.st_size, db) != bufa.st_size) { ShowError("geoip_cache reading didn't read all elements \n"); }
fclose(db);
ShowStatus("Finished Reading "CL_GREEN"GeoIP"CL_RESET" Database.\n");
}