summaryrefslogtreecommitdiff
path: root/src/txt-converter
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-26 10:37:45 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-26 10:37:45 +0000
commit49e9510c432987393d10ec1b8b1c2d416c9feb42 (patch)
tree4d930ebf1094ad5972cb8ba20b89d12ce74d4f3c /src/txt-converter
parentfda87bd7ef5a71f4f5d5e604de1b15c58763efdd (diff)
downloadhercules-49e9510c432987393d10ec1b8b1c2d416c9feb42.tar.gz
hercules-49e9510c432987393d10ec1b8b1c2d416c9feb42.tar.bz2
hercules-49e9510c432987393d10ec1b8b1c2d416c9feb42.tar.xz
hercules-49e9510c432987393d10ec1b8b1c2d416c9feb42.zip
Adjusted eAthena code to compile cleanly in C++ mode.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12436 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/txt-converter')
-rw-r--r--src/txt-converter/login-converter.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/txt-converter/login-converter.c b/src/txt-converter/login-converter.c
index 6936ca782..b216ff8d2 100644
--- a/src/txt-converter/login-converter.c
+++ b/src/txt-converter/login-converter.c
@@ -34,11 +34,8 @@ char db_server_logindb[32] = "ragnarok";
int isGM(int account_id)
{
- struct gm_account *p;
- p = idb_get(gm_account_db,account_id);
- if( p == NULL)
- return 0;
- return p->level;
+ struct gm_account* p = (struct gm_account*)idb_get(gm_account_db,account_id);
+ return( p != NULL ) ? p->level : 0;
}
int read_gm_account()
@@ -74,7 +71,7 @@ int read_gm_account()
else {
if(p->level > 99)
p->level = 99;
- p = idb_put(gm_account_db,p->account_id,p);
+ p = (struct gm_account*)idb_put(gm_account_db,p->account_id,p);
if( p )
aFree(p);// old entry replaced
gm_counter++;