summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2018-01-23 14:00:44 -0500
committergumi <git@gumi.ca>2018-01-23 14:00:44 -0500
commit6d60143638699599414ed23d59a3e821467d731b (patch)
tree1888e5ec978d3fafd2a51fc252798f5a9b9a8317
parent57f226414fed86f5591d27fe029a76edccfbb8ac (diff)
downloadtmwa-18.1.23.tar.gz
tmwa-18.1.23.tar.bz2
tmwa-18.1.23.tar.xz
tmwa-18.1.23.zip
release v18.1.23v18.1.23
-rw-r--r--CHANGELOG2
-rw-r--r--src/map/atcommand.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 11db1c8..a9d33ac 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,5 @@
+v18.1.23
+ - fixed a crash that happened when trying to create item id 0
v18.1.3
- remove mob timers (unused)
- properly clear timers of all npcs (not just script)
diff --git a/src/map/atcommand.cpp b/src/map/atcommand.cpp
index 718b6f0..cf872de 100644
--- a/src/map/atcommand.cpp
+++ b/src/map/atcommand.cpp
@@ -1419,7 +1419,7 @@ ATCE atcommand_item(Session *s, dumb_ptr<map_session_data> sd,
P<struct item_data> item_data = TRY_UNWRAP(extract_item_opt(item_name), return ATCE::EXIST);
ItemNameId item_id = item_data->nameid;
- assert (item_id);
+ assert(item_id >= wrap<ItemNameId>(0));
{
get_count = number;
@@ -3859,7 +3859,7 @@ ATCE atcommand_chardelitem(Session *s, dumb_ptr<map_session_data> sd,
P<struct item_data> item_data = TRY_UNWRAP(extract_item_opt(item_name), return ATCE::EXIST);
ItemNameId item_id = item_data->nameid;
- assert (item_id);
+ assert(item_id >= wrap<ItemNameId>(0));
{
dumb_ptr<map_session_data> pl_sd = map_nick2sd(character);