From 7cd9ec4cc97e472298f5becebe73bef7cc8401db Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 5 Aug 2021 17:36:31 +0200 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- demo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/demo.c b/demo.c index 4920de1..d86385e 100644 --- a/demo.c +++ b/demo.c @@ -5,6 +5,8 @@ #include #include +#define TEST_TEXT "hello world" + int main(void) { @@ -54,7 +56,7 @@ main(void) ((uint8_t *)image.image)[i + 3] = 250U; } - if (libskrift_draw_text(ctx, "hello world", strlen("hello world"), &colour, 0, 300, &image) < 0) { + if (libskrift_draw_text(ctx, TEST_TEXT, sizeof(TEST_TEXT) - 1, &colour, 0, 300, &image) < 0) { perror("libskrift_draw_text"); return -1; } -- cgit v1.2.3-70-g09d2