[Commits] SDL: SDL_vsnprintf: when '.' is specified, take precision as 0 i...

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


details:   https://hg.libsdl.org/SDL/rev/b79e02e3846a
changeset: 12228:b79e02e3846a
user:      Ozkan Sezer <sezeroz at gmail.com>
date:      Wed Sep 26 17:11:40 2018 +0300
description:
SDL_vsnprintf: when '.' is specified, take precision as 0 if it is < 0.

diffstat:

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

diffs (13 lines):

diff -r 3c5adcfe014e -r b79e02e3846a src/stdlib/SDL_string.c
--- a/src/stdlib/SDL_string.c	Wed Sep 26 10:40:02 2018 +0300
+++ b/src/stdlib/SDL_string.c	Wed Sep 26 17:11:40 2018 +0300
@@ -1618,6 +1618,9 @@
                 } else {
                     info.precision = 0;
                 }
+                if (info.precision < 0) {
+                    info.precision = 0;
+                }
             }
 
             while (!done) {


More information about the commits mailing list