diff options
author | 2010-10-25 04:16:34 +0000 | |
---|---|---|
committer | 2010-10-25 04:16:34 +0000 | |
commit | e61f11756ae946bc4dddfd2077b20b87d7a7b718 (patch) | |
tree | 8953d3e818725a9729fece70ac9e649f4d5db654 /src/emu/ui.c | |
parent | 0161a84852c34d28da085987f2d581badab4a07b (diff) |
Hard-code a limit to the number of passes in case it doesn't converge
(found 1 case so far).
Diffstat (limited to 'src/emu/ui.c')
-rw-r--r-- | src/emu/ui.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/emu/ui.c b/src/emu/ui.c index e99b1d3bb1f..72e07ac432d 100644 --- a/src/emu/ui.c +++ b/src/emu/ui.c @@ -729,7 +729,8 @@ void ui_draw_text_box(render_container *container, const char *text, int justify float target_x, target_y; float last_target_height = 0; - while (1) + // limit this iteration to a finite number of passes + for (int pass = 0; pass < 5; pass++) { /* determine the target location */ target_x = xpos - 0.5f * target_width; |