GBA Input: Fix warnings
Jeffrey Pfau jeffrey@endrift.com
Fri, 31 Jul 2015 16:52:18 -0700
1 files changed,
3 insertions(+),
2 deletions(-)
jump to
M
src/gba/input.c
→
src/gba/input.c
@@ -433,8 +433,9 @@ }
void GBAInputBindAxis(struct GBAInputMap* map, uint32_t type, int axis, const struct GBAAxis* description) { struct GBAInputMapImpl* impl = _guaranteeMap(map, type); - TableEnumerate(&impl->axes, _unbindAxis, &description->highDirection); - TableEnumerate(&impl->axes, _unbindAxis, &description->lowDirection); + struct GBAAxis d2 = *description; + TableEnumerate(&impl->axes, _unbindAxis, &d2.highDirection); + TableEnumerate(&impl->axes, _unbindAxis, &d2.lowDirection); struct GBAAxis* dup = malloc(sizeof(struct GBAAxis)); *dup = *description; TableInsert(&impl->axes, axis, dup);