diff options
author | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-01 09:37:50 +0000 |
---|---|---|
committer | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-01 09:37:50 +0000 |
commit | 74a30ea8d414cec9fba211298c72b2a686b0582a (patch) | |
tree | c8c111060aad9e80949fd07d77104c1c6747a299 /src/map/script.c | |
parent | a41884fbb032359e4f0bfcdaee50acb749ed8862 (diff) | |
download | hercules-74a30ea8d414cec9fba211298c72b2a686b0582a.tar.gz hercules-74a30ea8d414cec9fba211298c72b2a686b0582a.tar.bz2 hercules-74a30ea8d414cec9fba211298c72b2a686b0582a.tar.xz hercules-74a30ea8d414cec9fba211298c72b2a686b0582a.zip |
Fixed the dynamic shop system memory allocation and id_db problem. Added sample script.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5842 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c index fdae52784..204922fa5 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -9871,7 +9871,9 @@ int buildin_npcshopitem(struct script_state *st) }
nd = (struct npc_data *)aRealloc(nd,sizeof(struct npc_data) +
- sizeof(nd->u.shop_item[0]) * n);
+ sizeof(nd->u.shop_item[0]) * (n+1));
+
+ map_addiddb(&nd->bl);
nd->master_nd = ((struct npc_data *)map_id2bl(st->oid));
} else {
|