From 117526ec778fcdaf487897dab0b517aeafce5e64 Mon Sep 17 00:00:00 2001 From: Duncan Frost Date: Sat, 6 Jun 2015 20:12:21 +0100 Subject: [PATCH] Fix #1239. Issue caused by sign extension. --- src/world/footpath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/world/footpath.c b/src/world/footpath.c index 5cc366dc8b..30f19d67dd 100644 --- a/src/world/footpath.c +++ b/src/world/footpath.c @@ -499,7 +499,7 @@ void footpath_get_coordinates_from_pos(int screenX, int screenY, int *x, int *y, if (interactionType != VIEWPORT_INTERACTION_ITEM_FOOTPATH || !(viewport->flags & (VIEWPORT_FLAG_UNDERGROUND_INSIDE | VIEWPORT_FLAG_HIDE_BASE | VIEWPORT_FLAG_HIDE_VERTICAL))) { get_map_coordinates_from_pos(screenX, screenY, VIEWPORT_INTERACTION_MASK_FOOTPATH & VIEWPORT_INTERACTION_MASK_TERRAIN, &map_pos.x, &map_pos.y, &interactionType, &myMapElement, &viewport); if (interactionType == VIEWPORT_INTERACTION_ITEM_NONE) { - if (x != NULL) *x = 0x8000; + if (x != NULL) *x = (sint16)0x8000; return; } }