removed one use of memcpy and replaced with *a = *b

pull/2/head
Sara 2023-05-05 23:23:04 +02:00
parent 2457858399
commit 64b8dbcbf3
1 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@
#include "SDL2/SDL_render.h" #include "SDL2/SDL_render.h"
#include "SDL2/SDL_surface.h" #include "SDL2/SDL_surface.h"
#include "SDL2/SDL_ttf.h" #include "SDL2/SDL_ttf.h"
#include <stddef.h>
#define NUM_DRAWCMDS 2048 #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)); memmove(dest, insertpoint, count*sizeof(drawcmd_t));
} }
} }
memcpy(insertpoint, cmd, sizeof(drawcmd_t)); *insertpoint = *cmd;
insertpoint->ui = _render_mode == 1; insertpoint->ui = _render_mode == 1;
} }