summaryrefslogtreecommitdiff
path: root/src/char/int_storage.c
diff options
context:
space:
mode:
authorsmokexyz <sagunkho@hotmail.com>2017-06-02 22:10:00 +0800
committersmokexyz <sagunkho@hotmail.com>2017-06-02 22:10:00 +0800
commit07d70d9eab4d07dea291a2de4670c67664eafdce (patch)
tree80c2fb64218972c408f3b4faf02e7fbc44931983 /src/char/int_storage.c
parentf30edc7f02fb0c290d302d9abc77d970bb05fb62 (diff)
downloadhercules-07d70d9eab4d07dea291a2de4670c67664eafdce.tar.gz
hercules-07d70d9eab4d07dea291a2de4670c67664eafdce.tar.bz2
hercules-07d70d9eab4d07dea291a2de4670c67664eafdce.tar.xz
hercules-07d70d9eab4d07dea291a2de4670c67664eafdce.zip
Fix replace statement formatting in storage save function.
Diffstat (limited to 'src/char/int_storage.c')
-rw-r--r--src/char/int_storage.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/char/int_storage.c b/src/char/int_storage.c
index 20e852c66..65301127f 100644
--- a/src/char/int_storage.c
+++ b/src/char/int_storage.c
@@ -86,13 +86,13 @@ int inter_storage_tosql(int account_id, const struct storage_data *p)
StrBuf->AppendStr(&buf, ", `expire_time`, `bound`, `unique_id`) VALUES");
}
- StrBuf->Printf(&buf, "('%d', '%d', '%d', '%d', '%u', '%d', '%d', '%d'",
- cp_it->id, account_id, p_it->nameid, p_it->amount, p_it->equip, p_it->identify, p_it->refine, p_it->attribute);
+ StrBuf->Printf(&buf, "%s('%d', '%d', '%d', '%d', '%u', '%d', '%d', '%d'",
+ total_updates > 0 ? ", " : "", cp_it->id, account_id, p_it->nameid, p_it->amount, p_it->equip, p_it->identify, p_it->refine, p_it->attribute);
for (k = 0; k < MAX_SLOTS; k++)
StrBuf->Printf(&buf, ", '%d'", p_it->card[k]);
for (k = 0; k < MAX_ITEM_OPTIONS; ++k)
StrBuf->Printf(&buf, ", '%d', '%d'", p_it->option[k].index, p_it->option[k].value);
- StrBuf->Printf(&buf, ", '%u', '%d', '%"PRIu64"')%s", p_it->expire_time, p_it->bound, p_it->unique_id, total_updates > 0 ? ", " : "");
+ StrBuf->Printf(&buf, ", '%u', '%d', '%"PRIu64"')", p_it->expire_time, p_it->bound, p_it->unique_id);
total_updates++;
}