From 6c31098eb0195c024f6eaf468ac918cc7ce37cf3 Mon Sep 17 00:00:00 2001 From: Haru Date: Sun, 17 Sep 2017 19:32:57 +0200 Subject: Pass the correct types and sizes to the StmtBind functions Fixes #1531 (and other similar issues) Signed-off-by: Haru --- src/map/npc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/map/npc.c') 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; -- cgit v1.2.3-60-g2f50