diff options
Diffstat (limited to 'src/gui/src/line_edit.c')
| -rw-r--r-- | src/gui/src/line_edit.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/gui/src/line_edit.c b/src/gui/src/line_edit.c index df52fd0..a7d56c8 100644 --- a/src/gui/src/line_edit.c +++ b/src/gui/src/line_edit.c @@ -26,7 +26,13 @@ static int render_left(const struct gui_line_edit *const l, s->x = *x; s->y = y; - sprite_sort(s); + + if (sprite_sort(s)) + { + fprintf(stderr, "%s: sprite_sort failed\n", __func__); + return -1; + } + *x = s->x + s->w; return 0; } @@ -66,7 +72,12 @@ static int render_mid(const struct gui_line_edit *const l, else m->w = mid_w; - sprite_sort(m); + if (sprite_sort(m)) + { + fprintf(stderr, "%s: sprite_sort failed\n", __func__); + return -1; + } + *x += m->w; } } @@ -85,8 +96,13 @@ static int render_right(const short x, const short y) s->x = x; s->y = y; - sprite_sort(s); - return 0; + + const int ret = sprite_sort(s); + + if (ret) + fprintf(stderr, "%s: sprite_sort failed\n", __func__); + + return ret; } static int render(const struct gui_common *const g) |
