SDL_vsnprintf: when '.' is specified, take precision as 0 if it is < 0.
authorOzkan Sezer <sezeroz@gmail.com>
Wed, 26 Sep 2018 17:11:40 +0300
changeset 12228b79e02e3846a
parent 12227 3c5adcfe014e
child 12229 2fb171be56e0
SDL_vsnprintf: when '.' is specified, take precision as 0 if it is < 0.
src/stdlib/SDL_string.c
     1.1 --- a/src/stdlib/SDL_string.c	Wed Sep 26 10:40:02 2018 +0300
     1.2 +++ b/src/stdlib/SDL_string.c	Wed Sep 26 17:11:40 2018 +0300
     1.3 @@ -1618,6 +1618,9 @@
     1.4                  } else {
     1.5                      info.precision = 0;
     1.6                  }
     1.7 +                if (info.precision < 0) {
     1.8 +                    info.precision = 0;
     1.9 +                }
    1.10              }
    1.11  
    1.12              while (!done) {