From 359a2f53708a5237ab5cd4d0ad9c9c2bee718270 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Fri, 4 Oct 2024 09:22:34 +0200 Subject: [PATCH] Fix shadowed variables --- src/SDL_renderer_textengine.c | 6 +++--- src/SDL_ttf.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/SDL_renderer_textengine.c b/src/SDL_renderer_textengine.c index a7140461..6b4bc91d 100644 --- a/src/SDL_renderer_textengine.c +++ b/src/SDL_renderer_textengine.c @@ -584,9 +584,9 @@ static AtlasDrawSequence *CreateDrawSequence(TTF_DrawOperation *ops, int num_ops float *texcoords = sequence->texcoords; for (int i = 0; i < count; ++i) { - AtlasGlyph *glyph = (AtlasGlyph *)ops[i].copy.reserved; - SDL_memcpy(texcoords, glyph->texcoords, sizeof(glyph->texcoords)); - texcoords += SDL_arraysize(glyph->texcoords); + AtlasGlyph *glyph2 = (AtlasGlyph *)ops[i].copy.reserved; + SDL_memcpy(texcoords, glyph2->texcoords, sizeof(glyph2->texcoords)); + texcoords += SDL_arraysize(glyph2->texcoords); } } diff --git a/src/SDL_ttf.c b/src/SDL_ttf.c index e0ce10cd..4591797f 100644 --- a/src/SDL_ttf.c +++ b/src/SDL_ttf.c @@ -3845,8 +3845,8 @@ static bool LayoutTextWrapped(TTF_Text *text) if (!lines) { goto done; } - for (int i = 0; i < (numLines - 1); ++i) { - lines[i] = -1; + for (int j = 0; j < (numLines - 1); ++j) { + lines[j] = -1; } }