From 0f9677af95a6d2a7ff387039072c352e0d3eda9e Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Fri, 4 Oct 2024 03:40:56 +0300
Subject: [PATCH] showfont.c: remove C99ism (for loop initial declaration)
---
examples/showfont.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/examples/showfont.c b/examples/showfont.c
index 2e0b3c67..cf87685c 100644
--- a/examples/showfont.c
+++ b/examples/showfont.c
@@ -118,8 +118,9 @@ static void DrawScene(Scene *scene)
if (GetHighlightExtents(scene, &marker1, &marker2)) {
TTF_SubString **highlights = TTF_GetTextSubStringsForRange(scene->text, marker1, marker2, NULL);
if (highlights) {
+ int i;
SDL_SetRenderDrawColor(renderer, 0xCC, 0xCC, 0x00, 0xFF);
- for (int i = 0; highlights[i]; ++i) {
+ for (i = 0; highlights[i]; ++i) {
SDL_FRect rect;
SDL_RectToFRect(&highlights[i]->rect, &rect);
rect.x += x;