diff --git a/src/corelib/render.c b/src/corelib/render.c index d1a3144..3be0081 100644 --- a/src/corelib/render.c +++ b/src/corelib/render.c @@ -9,6 +9,7 @@ #include "SDL2/SDL_render.h" #include "SDL2/SDL_surface.h" #include "SDL2/SDL_ttf.h" +#include #define NUM_DRAWCMDS 2048 @@ -337,7 +338,7 @@ static void _insert_drawcmd_at(size_t index, const drawcmd_t* cmd) { memmove(dest, insertpoint, count*sizeof(drawcmd_t)); } } - memcpy(insertpoint, cmd, sizeof(drawcmd_t)); + *insertpoint = *cmd; insertpoint->ui = _render_mode == 1; }