mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
SDL_string.c (SDL_PrintString): avoid MSVC signed/unsigned mismatch warning
This commit is contained in:
parent
5342ae2bba
commit
6eeb8593ba
@ -1397,8 +1397,8 @@ SDL_PrintString(char *text, size_t maxlen, SDL_FormatInfo *info, const char *str
|
|||||||
length += SDL_min(slen, maxlen);
|
length += SDL_min(slen, maxlen);
|
||||||
|
|
||||||
if (info) {
|
if (info) {
|
||||||
if (info->precision >= 0 && info->precision < sz) {
|
if (info->precision >= 0 && (size_t)info->precision < sz) {
|
||||||
slen = info->precision;
|
slen = (size_t)info->precision;
|
||||||
if (slen < maxlen) {
|
if (slen < maxlen) {
|
||||||
text[slen] = 0;
|
text[slen] = 0;
|
||||||
length -= (sz - slen);
|
length -= (sz - slen);
|
||||||
|
Loading…
Reference in New Issue
Block a user