summaryrefslogtreecommitdiff
path: root/src/map/atcommand.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-06-24 11:20:19 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-06-24 11:20:24 -0700
commit7e71c1db0d46d7ff4dd53af9356e1a60814dd509 (patch)
treed3d602bb06ce351d5a7a9f777e0630395230ba80 /src/map/atcommand.cpp
parent6fc0f5f1c1704664e178430056376981520744b4 (diff)
downloadtmwa-7e71c1db0d46d7ff4dd53af9356e1a60814dd509.tar.gz
tmwa-7e71c1db0d46d7ff4dd53af9356e1a60814dd509.tar.bz2
tmwa-7e71c1db0d46d7ff4dd53af9356e1a60814dd509.tar.xz
tmwa-7e71c1db0d46d7ff4dd53af9356e1a60814dd509.zip
Don't crash when giving invalid ID to @item
Diffstat (limited to 'src/map/atcommand.cpp')
-rw-r--r--src/map/atcommand.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/map/atcommand.cpp b/src/map/atcommand.cpp
index a6c89e5..6833b15 100644
--- a/src/map/atcommand.cpp
+++ b/src/map/atcommand.cpp
@@ -1351,6 +1351,8 @@ ATCE atcommand_item(Session *s, dumb_ptr<map_session_data> sd,
item_id = item_data->nameid;
else if (extract(item_name, &item_id) && (item_data = itemdb_exists(item_id)) != NULL)
item_id = item_data->nameid;
+ else
+ return ATCE::EXIST;
if (item_id)
{