Fix bug with the improvement to text wrapping
Cursor was sometimes in the wrong place
This commit is contained in:
parent
1f05aa7f21
commit
e7fabd8601
@ -1196,8 +1196,8 @@ void textnpos(char *s, int n, int w, int *cx, int *cy)
|
|||||||
{
|
{
|
||||||
x = 0;
|
x = 0;
|
||||||
y += FONT_H+2;
|
y += FONT_H+2;
|
||||||
if (*s==' ')
|
if (*(s+1)==' ')
|
||||||
continue;
|
x -= font_data[font_ptrs[(int)(' ')]];
|
||||||
}
|
}
|
||||||
n--;
|
n--;
|
||||||
}
|
}
|
||||||
@ -1240,8 +1240,8 @@ int textposxy(char *s, int width, int w, int h)
|
|||||||
if (x>=width) {
|
if (x>=width) {
|
||||||
x = 0;
|
x = 0;
|
||||||
y += FONT_H+2;
|
y += FONT_H+2;
|
||||||
if (*s==' ')
|
if (*(s+1)==' ')
|
||||||
continue;
|
x -= font_data[font_ptrs[(int)(' ')]];
|
||||||
}
|
}
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user