Skip to content

Commit

Permalink
fixing pointer arithmetric error
Browse files Browse the repository at this point in the history
  • Loading branch information
yqh committed Oct 30, 2020
1 parent 8072df1 commit 68bb88d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lab3/starter/shm/shm_stack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 68bb88d

Please sign in to comment.