diff --git a/lab3/starter/shm/shm_stack.c b/lab3/starter/shm/shm_stack.c index ddaedc35..637695a8 100644 --- a/lab3/starter/shm/shm_stack.c +++ b/lab3/starter/shm/shm_stack.c @@ -73,7 +73,7 @@ int init_shm_stack(ISTACK *p, int stack_size) p->size = stack_size; p->pos = -1; - p->items = (int *) (p + sizeof(ISTACK)); + p->items = (int *) ((char *)p + sizeof(ISTACK)); return 0; }