diff options
author | Haru <haru@dotalux.com> | 2016-08-16 01:31:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-16 01:31:41 +0200 |
commit | 225f499e1eae19946af8fb9347286a99bab99ac2 (patch) | |
tree | 10056ec226bed643fdba43db540ac4fa6f1aa255 /src/char/char.c | |
parent | a737812d7ceadb8ee02dae88131b968f459c0fe3 (diff) | |
parent | 5e2d5385617644a4ff02074ef213c72fc33f1fe3 (diff) | |
download | hercules-225f499e1eae19946af8fb9347286a99bab99ac2.tar.gz hercules-225f499e1eae19946af8fb9347286a99bab99ac2.tar.bz2 hercules-225f499e1eae19946af8fb9347286a99bab99ac2.tar.xz hercules-225f499e1eae19946af8fb9347286a99bab99ac2.zip |
Merge pull request #1400 from 4144/sqlfix
Add missing sql escapes in char server
Diffstat (limited to 'src/char/char.c')
-rw-r--r-- | src/char/char.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/char/char.c b/src/char/char.c index 51411791e..2851d3eba 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -805,7 +805,7 @@ int char_memitemdata_to_sql(const struct item items[], int max, int id, int tabl StrBuf->Printf(&buf, "UPDATE `%s` SET `amount`='%d', `equip`='%u', `identify`='%d', `refine`='%d',`attribute`='%d', `expire_time`='%u', `bound`='%d'", tablename, items[i].amount, items[i].equip, items[i].identify, items[i].refine, items[i].attribute, items[i].expire_time, items[i].bound); for (j = 0; j < MAX_SLOTS; ++j) - StrBuf->Printf(&buf, ", `card%d`=%d", j, items[i].card[j]); + StrBuf->Printf(&buf, ", `card%d`='%d'", j, items[i].card[j]); if (has_favorite) StrBuf->Printf(&buf, ", `favorite`='%d'", items[i].favorite); StrBuf->Printf(&buf, " WHERE `id`='%d' LIMIT 1", item.id); |