From 64b8dbcbf3ca48b53b48023e8dafd253edf95a12 Mon Sep 17 00:00:00 2001 From: Sara Date: Fri, 5 May 2023 23:23:04 +0200 Subject: [PATCH] removed one use of memcpy and replaced with *a = *b --- src/corelib/render.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; }