diff options
author | Haru <haru@dotalux.com> | 2016-12-02 21:02:55 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-12-02 21:03:33 +0100 |
commit | 17420ee563282ba1791a77c55ede9d8f5f504ae5 (patch) | |
tree | 370148d9d4c58a8e9f70f0e8e5a2c5d50d585f2f | |
parent | 78854572cfc432ae439cdb20f83d9d19c4748b4c (diff) | |
download | hercules-17420ee563282ba1791a77c55ede9d8f5f504ae5.tar.gz hercules-17420ee563282ba1791a77c55ede9d8f5f504ae5.tar.bz2 hercules-17420ee563282ba1791a77c55ede9d8f5f504ae5.tar.xz hercules-17420ee563282ba1791a77c55ede9d8f5f504ae5.zip |
Fixed a null-pointer dereference in BUILDIN(makeitem2)
Signed-off-by: Haru <haru@dotalux.com>
-rw-r--r-- | src/map/script.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c index 24faa6756..5d9198123 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -8030,7 +8030,7 @@ BUILDIN(makeitem2) if (script_isstringtype(st, 2)) { const char *name = script_getstr(st, 2); struct item_data *item_data = itemdb->search_name(name); - if (item_data == NULL) + if (item_data != NULL) nameid = item_data->nameid; } else { nameid = script_getnum(st, 2); |