From 599254844107e19df52842f4e9f75cd2895a4815 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Fri, 4 Oct 2024 14:40:04 +0300
Subject: [PATCH] simplified shadowed variables fix after PR/400
---
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 6b4bc91d..243efa9c 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 *glyph2 = (AtlasGlyph *)ops[i].copy.reserved;
- SDL_memcpy(texcoords, glyph2->texcoords, sizeof(glyph2->texcoords));
- texcoords += SDL_arraysize(glyph2->texcoords);
+ glyph = (AtlasGlyph *)ops[i].copy.reserved;
+ SDL_memcpy(texcoords, glyph->texcoords, sizeof(glyph->texcoords));
+ texcoords += SDL_arraysize(glyph->texcoords);
}
}
diff --git a/src/SDL_ttf.c b/src/SDL_ttf.c
index 4591797f..d4ba9dcc 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 j = 0; j < (numLines - 1); ++j) {
- lines[j] = -1;
+ for (i = 0; i < (numLines - 1); ++i) {
+ lines[i] = -1;
}
}