aboutsummaryrefslogtreecommitdiff
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/Item.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/Item.c b/generic/Item.c
index f6ed14d..c3231a8 100644
--- a/generic/Item.c
+++ b/generic/Item.c
@@ -1874,7 +1874,7 @@ GetItemTransform(ZnItem item,
ZnItem *items;
int i;
ZnTransfo t_tmp, *t1, *t2, *swap;
- ZnPoint *pos = NULL;
+ ZnPoint *pos;
if (item_stack == NULL) {
item_stack = ZnListNew(16, sizeof(ZnItem));
@@ -1893,8 +1893,9 @@ GetItemTransform(ZnItem item,
t2 = &t_tmp;
items = (ZnItem *) ZnListArray(item_stack);
for (i = ZnListSize(item_stack)-1; i >= 0; i--) {
+ pos = NULL;
if (items[i]->class->pos_offset >= 0) {
- pos = ((void *) items[i]) + items[i]->class->pos_offset;
+ pos = (ZnPoint *) (((char *) items[i]) + items[i]->class->pos_offset);
if (pos->x == 0 && pos->y == 0) {
pos = NULL;
}