SDL_string.c (SDL_PrintString): avoid MSVC signed/unsigned mismatch warning

This commit is contained in:
Ozkan Sezer 2018-09-27 01:10:50 +03:00
parent 5342ae2bba
commit 6eeb8593ba
1 changed files with 2 additions and 2 deletions

View File

@ -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);