diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/npc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 855c6f650..cb40c85c5 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1568,7 +1568,7 @@ static int npc_selllist_sub(struct map_session_data* sd, int n, unsigned short* int key_refine = 0; int key_attribute = 0; int key_identify = 0; - int key_card = 0; + int key_card[MAX_SLOTS]; // discard old contents script_cleararray_pc(sd, "@sold_nameid", (void*)0); @@ -1579,6 +1579,7 @@ static int npc_selllist_sub(struct map_session_data* sd, int n, unsigned short* for( j = 0; MAX_SLOTS > j; j++ ) {// clear each of the card slot entries + key_card[j] = 0; snprintf(card_slot, sizeof(card_slot), "@sold_card%d", j + 1); script_cleararray_pc(sd, card_slot, (void*)0); } @@ -1600,7 +1601,7 @@ static int npc_selllist_sub(struct map_session_data* sd, int n, unsigned short* for( j = 0; MAX_SLOTS > j; j++ ) {// store each of the cards from the equipment in the array snprintf(card_slot, sizeof(card_slot), "@sold_card%d", j + 1); - script_setarray_pc(sd, card_slot, i, (void*)(intptr_t)sd->status.inventory[idx].card[j], &key_card); + script_setarray_pc(sd, card_slot, i, (void*)(intptr_t)sd->status.inventory[idx].card[j], &key_card[j]); } } } |