summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
Diffstat (limited to 'src/char')
-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");
}