diff options
Diffstat (limited to 'src/escpos')
-rw-r--r-- | src/escpos/parser.rl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/escpos/parser.rl b/src/escpos/parser.rl index 7cf828f..34f4055 100644 --- a/src/escpos/parser.rl +++ b/src/escpos/parser.rl @@ -75,7 +75,7 @@ render_chr(struct escpos_canvas *canvas, struct cursor *cursor, const struct ras } } } - cursor->x += MIN(glyph->width + SPACING, canvas->w - cursor->x); + cursor->x += MIN((size_t)glyph->width + SPACING, canvas->w - cursor->x); cursor->wy = MIN(cursor->y + MAX(raster->font.height, 1) - 1, canvas->h); } @@ -226,7 +226,7 @@ cut(const struct escpos_parser *parser, struct escpos_canvas *canvas, struct cur action text { putc(fc, stderr); - uint32_t cp; + uint32_t cp = 0; if (utf8_decode(&utf8.state, &cp, fc) == UTF8_ACCEPT) render_chr(&parser->print_buffer, &print_buffer_cursor, &raster, cp); } |