summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2017-04-13 11:30:00 +0000
committer/dev/humancontroller <devhc@example.com>2017-04-15 17:24:16 +0200
commit787ae313812f0a385f3cec9216fa0e67df148ca7 (patch)
tree1a237cba93c991aa09280b2765a23a41179a91ab /src/ui
parent979776bf1d7319218d84dd488ed69a45a854dce1 (diff)
fix a bunch of C-specific programming errors
detected by Clang
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/ui_shared.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/ui_shared.c b/src/ui/ui_shared.c
index f63a9fd..f66476c 100644
--- a/src/ui/ui_shared.c
+++ b/src/ui/ui_shared.c
@@ -1125,10 +1125,10 @@ void Menu_TransitionItemByName(menuDef_t *menu, const char *p, rectDef_t rectFro
item->window.offsetTime = time;
memcpy(&item->window.rectClient, &rectFrom, sizeof(rectDef_t));
memcpy(&item->window.rectEffects, &rectTo, sizeof(rectDef_t));
- item->window.rectEffects2.x = abs(rectTo.x - rectFrom.x) / amt;
- item->window.rectEffects2.y = abs(rectTo.y - rectFrom.y) / amt;
- item->window.rectEffects2.w = abs(rectTo.w - rectFrom.w) / amt;
- item->window.rectEffects2.h = abs(rectTo.h - rectFrom.h) / amt;
+ item->window.rectEffects2.x = fabs(rectTo.x - rectFrom.x) / amt;
+ item->window.rectEffects2.y = fabs(rectTo.y - rectFrom.y) / amt;
+ item->window.rectEffects2.w = fabs(rectTo.w - rectFrom.w) / amt;
+ item->window.rectEffects2.h = fabs(rectTo.h - rectFrom.h) / amt;
Item_UpdatePosition(item);
}
}