From e7fabd8601d75cf3dd85219eafbcb00400ff0502 Mon Sep 17 00:00:00 2001 From: jacksonmj Date: Thu, 14 Jun 2012 11:56:40 +0100 Subject: [PATCH] Fix bug with the improvement to text wrapping Cursor was sometimes in the wrong place --- src/graphics.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/graphics.c b/src/graphics.c index 9b19872d1..20a6a3948 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1196,8 +1196,8 @@ void textnpos(char *s, int n, int w, int *cx, int *cy) { x = 0; y += FONT_H+2; - if (*s==' ') - continue; + if (*(s+1)==' ') + x -= font_data[font_ptrs[(int)(' ')]]; } n--; } @@ -1240,8 +1240,8 @@ int textposxy(char *s, int width, int w, int h) if (x>=width) { x = 0; y += FONT_H+2; - if (*s==' ') - continue; + if (*(s+1)==' ') + x -= font_data[font_ptrs[(int)(' ')]]; } n++; }