diff libvo/sub.c @ 11297:b4c7de4cfbf2

prevent lockups on words which do not fit on the screen - temporary fix
author henry
date Mon, 27 Oct 2003 21:36:29 +0000
parents eee3cac803de
children 0d17f2b4292c
line wrap: on
line diff
--- a/libvo/sub.c	Mon Oct 27 21:12:29 2003 +0000
+++ b/libvo/sub.c	Mon Oct 27 21:36:29 2003 +0000
@@ -467,10 +467,10 @@
 		otp = tmp_otp = (struct osd_text_p *) calloc(1, sizeof(struct osd_text_p));
 		tmp_otp->ott = osl;
 		for (tmp_ott = tmp_otp->ott; exit == 0; ) {
-		    while ((tmp_ott != NULL) && (value + tmp_ott->osd_kerning + tmp_ott->osd_length <= xlimit)) {
+		    do {
 			value += tmp_ott->osd_kerning + tmp_ott->osd_length;
 			tmp_ott = tmp_ott->next;
-		    }
+		    } while ((tmp_ott != NULL) && (value + tmp_ott->osd_kerning + tmp_ott->osd_length <= xlimit));
 		    if (tmp_ott != NULL) {
 			struct osd_text_p *tmp = (struct osd_text_p *) calloc(1, sizeof(struct osd_text_p));