Skip to content

Commit

Permalink
SDL_string.c (SDL_PrintString): avoid MSVC signed/unsigned mismatch w…
Browse files Browse the repository at this point in the history
…arning
  • Loading branch information
sezero committed Sep 26, 2018
1 parent 5342ae2 commit 6eeb859
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stdlib/SDL_string.c
Expand Up @@ -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);
Expand Down

0 comments on commit 6eeb859

Please sign in to comment.