Skip to content

Commit

Permalink
SDL_vsnprintf: when '.' is specified, take precision as 0 if it is < 0.
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Sep 26, 2018
1 parent 69ab854 commit 8743e97
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/stdlib/SDL_string.c
Expand Up @@ -1618,6 +1618,9 @@ SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *fmt,
} else {
info.precision = 0;
}
if (info.precision < 0) {
info.precision = 0;
}
}

while (!done) {
Expand Down

0 comments on commit 8743e97

Please sign in to comment.