diff options
-rw-r--r-- | CHANGELOG.md | 5 | ||||
-rw-r--r-- | src/map/script.c | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index b18826d20..2b1745233 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ and this project does not adhere to [Semantic Versioning](http://semver.org/spec If you are reading this in a text editor, simply ignore this section --> +## [v2017.10.22-1] `October 22 2017` `PATCH 1` +### Fixed +- Fixed a wrong null pointer check in `logmes()`, which caused the command to never log and instead print debug information. + ## [v2017.10.22] `October 22 2017` ### Added - Added the script command `getmapinfo()`, which allows to obtain misc information about a map. (#1852) @@ -32,4 +36,5 @@ If you are reading this in a text editor, simply ignore this section - New versioning scheme and project changelogs/release notes (#1853) [Unreleased]: https://github.com/HerculesWS/Hercules/compare/stable...master +[v2017.10.22-1]: https://github.com/HerculesWS/Hercules/compare/v2017.10.22...v2017.10.22-1 [v2017.10.22]: https://github.com/HerculesWS/Hercules/compare/6b1fe2d...v2017.10.22 diff --git a/src/map/script.c b/src/map/script.c index d2101d21f..6b920514c 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -15866,11 +15866,12 @@ enum logmes_type { /*========================================== * Allows player to write logs (i.e. Bank NPC, etc) [Lupus] *------------------------------------------*/ -BUILDIN(logmes) { +BUILDIN(logmes) +{ const char *str = script_getstr(st, 2); struct map_session_data *sd = script->rid2sd(st); enum logmes_type type = LOGMES_NPC; - nullpo_retr(sd, false); + nullpo_retr(false, sd); if (script_hasdata(st, 3)) { type = script_getnum(st, 3); @@ -23505,7 +23506,7 @@ BUILDIN(dressroom) clif->dressroom_open(sd, 0); break; default: - ShowWarning("script:dressroom: unknown mode (%i).\n", mode); + ShowWarning("script:dressroom: unknown mode (%u).\n", mode); script_pushint(st, 0); return false; } |