Issue information

Issue ID
#459
Status
Fixed
Severity
None
Started
Hercules Elf Bot
Nov 20, 2007 20:04
Last Post
Hercules Elf Bot
Nov 20, 2007 20:04
Confirmation
N/A

Hercules Elf Bot - Nov 20, 2007 20:04

Originally posted by [b]Coltaro[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=459

Just a small mistake I'd like to point out:

The following code in char.c in memitemdata_to_sql contains twice the 'amount' field:

CODE
StringBuf_Printf(&buf, "UPDATE `%s` SET `amount`='%d', `equip`='%d', `identify`='%d', `refine`='%d',`attribute`='%d'",
    tablename, items[i].amount, items[i].equip, items[i].identify, items[i].refine, items[i].attribute);
for( j = 0; j < MAX_SLOTS; ++j )
    StringBuf_Printf(&buf, ", `card%d`=%d", j, items[i].card[j]);
StringBuf_Printf(&buf, ", `amount`='%d' WHERE `id`='%d' LIMIT 1", items[i].amount, item.id);


The last line should be:

CODE
StringBuf_Printf(&buf, " WHERE `id`='%d' LIMIT 1", item.id);


Thanks.