diff options
author | Haru <haru@dotalux.com> | 2017-09-17 19:32:57 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2017-11-18 19:25:36 +0100 |
commit | 6c31098eb0195c024f6eaf468ac918cc7ce37cf3 (patch) | |
tree | a38b4ecc291fe37a97f6f854ae241f32495711cb /src/map/npc.c | |
parent | a63c82c8bd29fd829a5d8cfba7d02d11cf4634c5 (diff) | |
download | hercules-6c31098eb0195c024f6eaf468ac918cc7ce37cf3.tar.gz hercules-6c31098eb0195c024f6eaf468ac918cc7ce37cf3.tar.bz2 hercules-6c31098eb0195c024f6eaf468ac918cc7ce37cf3.tar.xz hercules-6c31098eb0195c024f6eaf468ac918cc7ce37cf3.zip |
Pass the correct types and sizes to the StmtBind functions
Fixes #1531 (and other similar issues)
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 6 |
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; |