diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-05-16 16:11:16 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-05-16 16:11:16 +0000 |
commit | 02ccbd72df039de1a22a1f9e834b55978695ad27 (patch) | |
tree | 593a25a4ed4a371775d3420f12390bd823ceb728 /src/char_sql/int_auction.c | |
parent | ae980fe269823d24ba06b472ef9865d910228340 (diff) | |
download | hercules-02ccbd72df039de1a22a1f9e834b55978695ad27.tar.gz hercules-02ccbd72df039de1a22a1f9e834b55978695ad27.tar.bz2 hercules-02ccbd72df039de1a22a1f9e834b55978695ad27.tar.xz hercules-02ccbd72df039de1a22a1f9e834b55978695ad27.zip |
Fixed 64bit timestamps messing up auction/storage (bugreport:1454)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12713 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql/int_auction.c')
-rw-r--r-- | src/char_sql/int_auction.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/char_sql/int_auction.c b/src/char_sql/int_auction.c index c5cdf628b..ebfce7b6f 100644 --- a/src/char_sql/int_auction.c +++ b/src/char_sql/int_auction.c @@ -50,8 +50,8 @@ void auction_save(struct auction_data *auction) return; StringBuf_Init(&buf); - StringBuf_Printf(&buf, "UPDATE `%s` SET `seller_id` = '%d', `seller_name` = ?, `buyer_id` = '%d', `buyer_name` = ?, `price` = '%d', `buynow` = '%d', `hours` = '%d', `timestamp` = '%d', `nameid` = '%d', `item_name` = ?, `type` = '%d', `refine` = '%d', `attribute` = '%d'", - auction_db, auction->seller_id, auction->buyer_id, auction->price, auction->buynow, auction->hours, auction->timestamp, auction->item.nameid, auction->type, auction->item.refine, auction->item.attribute); + StringBuf_Printf(&buf, "UPDATE `%s` SET `seller_id` = '%d', `seller_name` = ?, `buyer_id` = '%d', `buyer_name` = ?, `price` = '%d', `buynow` = '%d', `hours` = '%d', `timestamp` = '%lu', `nameid` = '%d', `item_name` = ?, `type` = '%d', `refine` = '%d', `attribute` = '%d'", + auction_db, auction->seller_id, auction->buyer_id, auction->price, auction->buynow, auction->hours, (unsigned long)auction->timestamp, auction->item.nameid, auction->type, auction->item.refine, auction->item.attribute); for( j = 0; j < MAX_SLOTS; j++ ) StringBuf_Printf(&buf, ", `card%d` = '%d'", j, auction->item.card[j]); StringBuf_Printf(&buf, " WHERE `auction_id` = '%d'", auction->auction_id); @@ -85,8 +85,8 @@ unsigned int auction_create(struct auction_data *auction) StringBuf_Printf(&buf, "INSERT INTO `%s` (`seller_id`,`seller_name`,`buyer_id`,`buyer_name`,`price`,`buynow`,`hours`,`timestamp`,`nameid`,`item_name`,`type`,`refine`,`attribute`", auction_db); for( j = 0; j < MAX_SLOTS; j++ ) StringBuf_Printf(&buf, ",`card%d`", j); - StringBuf_Printf(&buf, ") VALUES ('%d',?,'%d',?,'%d','%d','%d','%d','%d',?,'%d','%d','%d'", - auction->seller_id, auction->buyer_id, auction->price, auction->buynow, auction->hours, auction->timestamp, auction->item.nameid, auction->type, auction->item.refine, auction->item.attribute); + StringBuf_Printf(&buf, ") VALUES ('%d',?,'%d',?,'%d','%d','%d','%lu','%d',?,'%d','%d','%d'", + auction->seller_id, auction->buyer_id, auction->price, auction->buynow, auction->hours, (unsigned long)auction->timestamp, auction->item.nameid, auction->type, auction->item.refine, auction->item.attribute); for( j = 0; j < MAX_SLOTS; j++ ) StringBuf_Printf(&buf, ",'%d'", auction->item.card[j]); StringBuf_AppendStr(&buf, ")"); |