From dafb447729edd6755492e9207d16ab8bfce4a8cf Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Fri, 5 Sep 2014 09:42:47 -0700 Subject: Fix a couple of bugs exposed by stricter server checks --- src/char/inter.cpp | 1 + src/map/magic-expr.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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, val_t *result, Slice 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) -- cgit v1.2.3-60-g2f50