summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2012-06-14 10:56:40 (GMT)
committer jacksonmj <mj-pt@jacksonmj.co.uk>2012-06-14 10:56:40 (GMT)
commite7fabd8601d75cf3dd85219eafbcb00400ff0502 (patch)
treede848b153b221fc3d0606c0c5d70b44e84759210 /src
parent1f05aa7f2147253cbb6113fee155bdb613f6a2e5 (diff)
downloadpowder-e7fabd8601d75cf3dd85219eafbcb00400ff0502.zip
powder-e7fabd8601d75cf3dd85219eafbcb00400ff0502.tar.gz
Fix bug with the improvement to text wrapping
Cursor was sometimes in the wrong place
Diffstat (limited to 'src')
-rw-r--r--src/graphics.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/graphics.c b/src/graphics.c
index 9b19872..20a6a39 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++;
}