Skip to content

Commit

Permalink
Fixed implicit memcpy() in AddVidModeToList()
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Aug 7, 2023
1 parent 9150989 commit edc708a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/SDL12_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -2136,8 +2136,7 @@ AddVidModeToList(VideoModeList *vmode, SDL12_Rect *mode, const Uint16 maxw, cons
}
vmode->modeslist12 = (SDL12_Rect *) ptr;

vmode->modeslist12[vmode->nummodes] = *mode;

SDL20_memcpy(&vmode->modeslist12[vmode->nummodes], mode, sizeof(vmode->modeslist12[vmode->nummodes]));
vmode->nummodes++;

return 0;
Expand Down

0 comments on commit edc708a

Please sign in to comment.