summaryrefslogtreecommitdiff
path: root/src/map/mapreg_sql.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-08-17 06:06:28 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-08-17 06:06:28 +0000
commit30013ffab514793477e755bda09fb3839df6cb02 (patch)
treed21c29c893626251eb6914779e23d827b6b97661 /src/map/mapreg_sql.c
parente37cb24a83833ece086ef5fcbfa3added3e11302 (diff)
downloadhercules-30013ffab514793477e755bda09fb3839df6cb02.tar.gz
hercules-30013ffab514793477e755bda09fb3839df6cb02.tar.bz2
hercules-30013ffab514793477e755bda09fb3839df6cb02.tar.xz
hercules-30013ffab514793477e755bda09fb3839df6cb02.zip
Fixed some messed up operator priority in the mapreg code (bugreport:2078).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13088 54d463be-8e91-2dee-dedb-b68131a5f0ec
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];