aboutsummaryrefslogtreecommitdiff
path: root/src/graphics/drawer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphics/drawer.c')
-rw-r--r--src/graphics/drawer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/graphics/drawer.c b/src/graphics/drawer.c
index 542c04c..be7b0ac 100644
--- a/src/graphics/drawer.c
+++ b/src/graphics/drawer.c
@@ -12,7 +12,7 @@ void write_cchar(struct Drawer* d, char s, unsigned int c) {
d->x = 0;
} else {
draw_cletter(d->x++, d->y, s, c);
- if (d->x > GG_MAX_X) {
+ if (d->x >= GG_MAX_X) {
d->y += 1;
d->x = 0;
}
@@ -35,7 +35,7 @@ void write_cstring(struct Drawer* d, char* s, unsigned int c) {
idx++;
} else {
draw_cletter(d->x++, d->y, s[idx++], c);
- if (d->x > GG_MAX_X) {
+ if (d->x >= GG_MAX_X) {
d->y += 1;
d->x = 0;
}
@@ -56,7 +56,7 @@ void set_drawer(struct Drawer* d, unsigned int x, unsigned int y) {
void write_chex32(struct Drawer* d, unsigned long val, unsigned int c) {
draw_chex32(d->x, d->y, val, c);
d->x += 8;
- if (d->x > GG_MAX_X) {
+ if (d->x >= GG_MAX_X) {
d->y += 1;
d->x %= GG_MAX_X;
}