From 6eeb8593ba8eb46fe37d1345587e3563e4c54f57 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Thu, 27 Sep 2018 01:10:50 +0300 Subject: [PATCH] SDL_string.c (SDL_PrintString): avoid MSVC signed/unsigned mismatch warning --- src/stdlib/SDL_string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stdlib/SDL_string.c b/src/stdlib/SDL_string.c index 4ef742d9dec9e..b65af54971fa0 100644 --- a/src/stdlib/SDL_string.c +++ b/src/stdlib/SDL_string.c @@ -1397,8 +1397,8 @@ SDL_PrintString(char *text, size_t maxlen, SDL_FormatInfo *info, const char *str length += SDL_min(slen, maxlen); if (info) { - if (info->precision >= 0 && info->precision < sz) { - slen = info->precision; + if (info->precision >= 0 && (size_t)info->precision < sz) { + slen = (size_t)info->precision; if (slen < maxlen) { text[slen] = 0; length -= (sz - slen);