summaryrefslogtreecommitdiff
path: root/src/map/mapreg_sql.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2017-11-18 20:23:46 +0100
committerGitHub <noreply@github.com>2017-11-18 20:23:46 +0100
commit66ee4dea37d47af769cc94c8b8ebd2b12699ce7c (patch)
treeb524690b23670f041e8824d2eecec69f6dc80389 /src/map/mapreg_sql.c
parent901df02711777462bd9e4016c91b8166441d9353 (diff)
parente5a63561bba9d09e5a88636f4982cdb2cf57a569 (diff)
downloadhercules-66ee4dea37d47af769cc94c8b8ebd2b12699ce7c.tar.gz
hercules-66ee4dea37d47af769cc94c8b8ebd2b12699ce7c.tar.bz2
hercules-66ee4dea37d47af769cc94c8b8ebd2b12699ce7c.tar.xz
hercules-66ee4dea37d47af769cc94c8b8ebd2b12699ce7c.zip
Merge pull request #1901 from MishimaHaruna/sql-bind-types
Correct and sanitize SQL bind types
Diffstat (limited to 'src/map/mapreg_sql.c')
-rw-r--r--src/map/mapreg_sql.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/mapreg_sql.c b/src/map/mapreg_sql.c
index 4cdb91b21..02015e011 100644
--- a/src/map/mapreg_sql.c
+++ b/src/map/mapreg_sql.c
@@ -211,9 +211,9 @@ void script_load_mapreg(void) {
mapreg->skip_insert = true;
- SQL->StmtBindColumn(stmt, 0, SQLDT_STRING, &varname[0], sizeof(varname), &length, NULL);
- SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &index, 0, NULL, NULL);
- SQL->StmtBindColumn(stmt, 2, SQLDT_STRING, &value[0], sizeof(value), NULL, NULL);
+ SQL->StmtBindColumn(stmt, 0, SQLDT_STRING, &varname, sizeof varname, &length, NULL);
+ SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &index, sizeof index, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 2, SQLDT_STRING, &value, sizeof value, NULL, NULL);
while ( SQL_SUCCESS == SQL->StmtNextRow(stmt) ) {
int s = script->add_str(varname);