diff --git a/test/testautomation_pen.c b/test/testautomation_pen.c index 33b71275f7..e0918def9b 100644 --- a/test/testautomation_pen.c +++ b/test/testautomation_pen.c @@ -1342,7 +1342,7 @@ pen_movementAndAxes(void *arg) _pen_simulate_init(&ptest, simulated_pens, 2); /* Simulate pen movements */ - while ((last_action = _pen_simulate(steps, &sim_pc, &simulated_pens[0], 2))) { + while ((last_action = _pen_simulate(steps, &sim_pc, &simulated_pens[0], 2)) != 0) { int attempts = 0; SDL_Pen *simpen = &simulated_pens[last_action->pen_index]; SDL_PenID reported_which = 0; diff --git a/test/testime.c b/test/testime.c index 0e75e274ac..003b3f19b4 100644 --- a/test/testime.c +++ b/test/testime.c @@ -501,7 +501,7 @@ static void _Redraw(int rendererID) drawnTextRect.y = dstrect.y; drawnTextRect.h = dstrect.h; - while ((codepoint = utf8_decode(utext, len = utf8_length(*utext)))) { + while ((codepoint = utf8_decode(utext, len = utf8_length(*utext))) != 0) { Sint32 advance = unifont_draw_glyph(codepoint, rendererID, &dstrect) * UNIFONT_DRAW_SCALE; dstrect.x += advance; drawnTextRect.w += advance; @@ -573,7 +573,7 @@ static void _Redraw(int rendererID) drawnTextRect.y = dstrect.y; drawnTextRect.h = dstrect.h; - while ((codepoint = utf8_decode(utext, len = utf8_length(*utext)))) { + while ((codepoint = utf8_decode(utext, len = utf8_length(*utext))) != 0) { Sint32 advance = unifont_draw_glyph(codepoint, rendererID, &dstrect) * UNIFONT_DRAW_SCALE; dstrect.x += advance; drawnTextRect.w += advance;