diff --git a/src/twn_loop.c b/src/twn_loop.c index 43e94ce..c562d37 100644 --- a/src/twn_loop.c +++ b/src/twn_loop.c @@ -613,9 +613,9 @@ static bool initialize(void) { if (!datum_font_filtering.ok) { ctx.font_filtering = TEXT_FONT_FILTERING_DEFAULT; } else { - if (SDL_strncmp(datum_font_filtering.u.s, "nearest", sizeof "nearest") == 0) { + if (SDL_strncmp(datum_font_filtering.u.s, "nearest", sizeof "nearest" - 1) == 0) { ctx.font_filtering = TEXTURE_FILTER_NEAREAST; - } else if (SDL_strncmp(datum_font_filtering.u.s, "linear", sizeof "nearest") == 0) { + } else if (SDL_strncmp(datum_font_filtering.u.s, "linear", sizeof "linear" - 1) == 0) { ctx.font_filtering = TEXTURE_FILTER_LINEAR; } else { ctx.font_filtering = TEXT_FONT_FILTERING_DEFAULT;