From 4f37fb4b71fc0d01ca2f9b72405de6b93a3d84a3 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; } }