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/char/int_homun.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/char/int_homun.c')
-rw-r--r-- | src/char/int_homun.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/char/int_homun.c b/src/char/int_homun.c index 04f4c8f21..a15a095dd 100644 --- a/src/char/int_homun.c +++ b/src/char/int_homun.c @@ -171,9 +171,9 @@ bool mapif_homunculus_save(const struct s_homunculus *hd) } else { for (i = 0; i < MAX_HOMUNSKILL; ++i) { if (hd->hskill[i].id > 0 && hd->hskill[i].lv != 0) { - SQL->StmtBindParam(stmt, 0, SQLDT_USHORT, &hd->hskill[i].id, 0); - SQL->StmtBindParam(stmt, 1, SQLDT_USHORT, &hd->hskill[i].lv, 0); - if (SQL_ERROR == SQL->StmtExecute(stmt)) { + if (SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_USHORT, &hd->hskill[i].id, sizeof hd->hskill[i].id) + || SQL_ERROR == SQL->StmtBindParam(stmt, 1, SQLDT_UCHAR, &hd->hskill[i].lv, sizeof hd->hskill[i].lv) + || SQL_ERROR == SQL->StmtExecute(stmt)) { SqlStmt_ShowDebug(stmt); flag = false; break; |