summaryrefslogtreecommitdiff
path: root/src/map/npc.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/npc.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/npc.c')
-rw-r--r--src/map/npc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 0702b2525..10ff4ebf2 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -1560,9 +1560,9 @@ void npc_market_fromsql(void)
return;
}
- SQL->StmtBindColumn(stmt, 0, SQLDT_STRING, &name[0], sizeof(name), NULL, NULL);
- SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &itemid, 0, NULL, NULL);
- SQL->StmtBindColumn(stmt, 2, SQLDT_INT, &amount, 0, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 0, SQLDT_STRING, &name, sizeof name, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &itemid, sizeof itemid, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 2, SQLDT_INT, &amount, sizeof amount, NULL, NULL);
while ( SQL_SUCCESS == SQL->StmtNextRow(stmt) ) {
struct npc_data *nd = NULL;