summaryrefslogtreecommitdiff
path: root/src/map/mapreg_sql.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-02-24 17:35:23 +0100
committerHaru <haru@dotalux.com>2014-03-05 22:35:03 +0100
commit4f3156b78f807553b11f37a7d0c898f6e358495b (patch)
tree1a329c6b4b17f2b6ae4ba113f494efbd67d3c996 /src/map/mapreg_sql.c
parentd25cc9b7dbc103cf1454db37159ffffeedaac149 (diff)
downloadhercules-4f3156b78f807553b11f37a7d0c898f6e358495b.tar.gz
hercules-4f3156b78f807553b11f37a7d0c898f6e358495b.tar.bz2
hercules-4f3156b78f807553b11f37a7d0c898f6e358495b.tar.xz
hercules-4f3156b78f807553b11f37a7d0c898f6e358495b.zip
Ref redesign, part 3
- Updated several functions to properly use the data structures defined in parts 1 and 2. - Special thanks to Ind for his help on this, as well as the previous two parts. - Fixes some crashes related to variable references passed back and forth between nested callfunc/callsub scopes (related: 2669e9a, 3259f89, 4f2de07) Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/mapreg_sql.c')
-rw-r--r--src/map/mapreg_sql.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/mapreg_sql.c b/src/map/mapreg_sql.c
index bdda652b8..61c25f24e 100644
--- a/src/map/mapreg_sql.c
+++ b/src/map/mapreg_sql.c
@@ -64,7 +64,7 @@ bool mapreg_setreg(int64 uid, int val) {
}
} else {
if( i )
- script->array_update(&mapreg->regs.arrays, uid, false);
+ script->array_update(&mapreg->regs, uid, false);
m = ers_alloc(mapreg->ers, struct mapreg_save);
@@ -83,7 +83,7 @@ bool mapreg_setreg(int64 uid, int val) {
}
} else { // val == 0
if( i )
- script->array_update(&mapreg->regs.arrays, uid, true);
+ script->array_update(&mapreg->regs, uid, true);
if( (m = i64db_get(mapreg->regs.vars, uid)) ) {
ers_free(mapreg->ers, m);
}
@@ -113,7 +113,7 @@ bool mapreg_setregstr(int64 uid, const char* str) {
if( str == NULL || *str == 0 ) {
if( i )
- script->array_update(&mapreg->regs.arrays, uid, true);
+ script->array_update(&mapreg->regs, uid, true);
if(name[1] != '@') {
if( SQL_ERROR == SQL->Query(map->mysql_handle, "DELETE FROM `%s` WHERE `varname`='%s' AND `index`='%d'", mapreg->table, name, i) )
Sql_ShowDebug(map->mysql_handle);
@@ -135,7 +135,7 @@ bool mapreg_setregstr(int64 uid, const char* str) {
}
} else {
if( i )
- script->array_update(&mapreg->regs.arrays, uid, false);
+ script->array_update(&mapreg->regs, uid, false);
m = ers_alloc(mapreg->ers, struct mapreg_save);