Browse Source

Fixed warning C4701: potentially uninitialized local variable 'drawnTextRect' used

Sam Lantinga 1 year ago
parent
commit
c0b27ccef9
1 changed files with 2 additions and 0 deletions
  1. 2 0
      test/testime.c

+ 2 - 0
test/testime.c

@@ -468,7 +468,9 @@ static void _Redraw(int rendererID)
     SDL_Renderer *renderer = state->renderers[rendererID];
     SDL_FRect drawnTextRect, cursorRect, underlineRect;
     drawnTextRect.x = textRect.x;
+    drawnTextRect.y = 0;
     drawnTextRect.w = 0;
+    drawnTextRect.h = 0;
 
     SDL_SetRenderDrawColor(renderer, backColor.r, backColor.g, backColor.b, backColor.a);
     SDL_RenderFillRect(renderer, &textRect);