summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/struct/map/shr_location.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/shared/struct/map/shr_location.erl b/src/shared/struct/map/shr_location.erl
index e7d4432..f980134 100644
--- a/src/shared/struct/map/shr_location.erl
+++ b/src/shared/struct/map/shr_location.erl
@@ -86,7 +86,11 @@ decode (Map) ->
X = maps:get(<<"x">>, Map),
Y = maps:get(<<"y">>, Map),
- true = (is_integer(X) and is_integer(Y)),
+ if
+ (not is_integer(X)) -> error({map, width, X});
+ (not is_integer(Y)) -> error({map, height, Y});
+ true -> ok
+ end,
validate({X, Y}).