summaryrefslogtreecommitdiff
path: root/src/map/mapreg_sql.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/mapreg_sql.c')
-rw-r--r--src/map/mapreg_sql.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/map/mapreg_sql.c b/src/map/mapreg_sql.c
index 401367611..89951fb76 100644
--- a/src/map/mapreg_sql.c
+++ b/src/map/mapreg_sql.c
@@ -36,8 +36,8 @@ char* mapreg_readregstr(int uid)
/// Modifies the value of an integer variable.
bool mapreg_setreg(int uid, int val)
{
- int num = uid & 0x00ffffff;
- int i = uid & 0xff000000 >> 24;
+ int num = (uid & 0x00ffffff);
+ int i = (uid & 0xff000000) >> 24;
const char* name = get_str(num);
if( val != 0 )
@@ -75,8 +75,8 @@ bool mapreg_setreg(int uid, int val)
/// Modifies the value of a string variable.
bool mapreg_setregstr(int uid, const char* str)
{
- int num = uid & 0x00ffffff;
- int i = uid & 0xff000000 >> 24;
+ int num = (uid & 0x00ffffff);
+ int i = (uid & 0xff000000) >> 24;
const char* name = get_str(num);
if( str == NULL || *str == 0 )
@@ -159,8 +159,8 @@ static void script_save_mapreg(void)
iter = mapreg_db->iterator(mapreg_db);
for( data = iter->first(iter,&key); iter->exists(iter); data = iter->next(iter,&key) )
{
- int num = key.i & 0x00ffffff;
- int i = key.i & 0xff000000 >> 24;
+ int num = (key.i & 0x00ffffff);
+ int i = (key.i & 0xff000000) >> 24;
const char* name = get_str(num);
if( name[1] == '@' )
@@ -174,8 +174,8 @@ static void script_save_mapreg(void)
iter = mapregstr_db->iterator(mapregstr_db);
for( data = iter->first(iter,&key); iter->exists(iter); data = iter->next(iter,&key) )
{
- int num = key.i & 0x00ffffff;
- int i = key.i & 0xff000000 >> 24;
+ int num = (key.i & 0x00ffffff);
+ int i = (key.i & 0xff000000) >> 24;
const char* name = get_str(num);
char tmp_str2[2*255+1];