[Commits] SDL: SDL_string.c (SDL_PrintString): avoid MSVC signed/unsigned ...

libsdl.org revision control commits-owner at libsdl.org
Wed Sep 26 15:11:01 PDT 2018


details:   https://hg.libsdl.org/SDL/rev/21c060522258
changeset: 12234:21c060522258
user:      Ozkan Sezer <sezeroz at gmail.com>
date:      Thu Sep 27 01:10:50 2018 +0300
description:
SDL_string.c (SDL_PrintString): avoid MSVC signed/unsigned mismatch warning

diffstat:

 src/stdlib/SDL_string.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (14 lines):

diff -r 2d31c1a48111 -r 21c060522258 src/stdlib/SDL_string.c
--- a/src/stdlib/SDL_string.c	Thu Sep 27 01:00:50 2018 +0300
+++ b/src/stdlib/SDL_string.c	Thu Sep 27 01:10:50 2018 +0300
@@ -1397,8 +1397,8 @@
     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);


More information about the commits mailing list