summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/char/inter.cpp1
-rw-r--r--src/map/magic-expr.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/char/inter.cpp b/src/char/inter.cpp
index 1cf41ff..f757991 100644
--- a/src/char/inter.cpp
+++ b/src/char/inter.cpp
@@ -369,6 +369,7 @@ RecvResult mapif_parse_WisReply(Session *tms)
CharName from = smcs->key.name;
Session *sms = server_for(smcs);
+ if (sms)
{
mapif_wis_end(sms, from, flag); // flag: 0: success to send wisper, 1: target character is not loged in?, 2: ignored by target
}
diff --git a/src/map/magic-expr.cpp b/src/map/magic-expr.cpp
index 4acce91..674c850 100644
--- a/src/map/magic-expr.cpp
+++ b/src/map/magic-expr.cpp
@@ -1339,7 +1339,7 @@ int fun_dir_towards(dumb_ptr<env_t>, val_t *result, Slice<val_t> args)
dx = ARGLOCATION(1).x - ARGLOCATION(0).x;
dy = ARGLOCATION(1).y - ARGLOCATION(0).y;
- if (ARGINT(1))
+ if (ARGINT(2))
{
/* 8-direction mode */
if (abs(dx) > abs(dy) * 2)