diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c index b0b3ad700..7db35dd7b 100644 --- a/src/render/SDL_render.c +++ b/src/render/SDL_render.c @@ -287,10 +287,10 @@ void * SDL_AllocateRenderVertices(SDL_Renderer *renderer, const size_t numbytes, const size_t alignment, size_t *offset) { const size_t needed = renderer->vertex_data_used + numbytes + alignment; - size_t current_offset = renderer->vertex_data_used; + const size_t current_offset = renderer->vertex_data_used; - size_t aligner = (alignment && ((current_offset & (alignment - 1)) != 0)) ? (alignment - (current_offset & (alignment - 1))) : 0; - size_t aligned = current_offset + aligner; + const size_t aligner = (alignment && ((current_offset & (alignment - 1)) != 0)) ? (alignment - (current_offset & (alignment - 1))) : 0; + const size_t aligned = current_offset + aligner; if (renderer->vertex_data_allocation < needed) { const size_t current_allocation = renderer->vertex_data ? renderer->vertex_data_allocation : 1024;