Skip to content

Commit

Permalink
Fixed implicit linkage to ftol2() on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Apr 13, 2020
1 parent c302c1a commit 1d87978
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/stdlib/SDL_stdlib.c
Expand Up @@ -266,8 +266,11 @@ SDL_trunc(double x)
#if defined(HAVE_TRUNC)
return trunc(x);
#else
/* !!! FIXME: there are more formal (correct!) ways to do this. */
return (double) ((Sint64) x);
if (x >= 0.0f) {
return SDL_floor(x);
} else {
return SDL_ceil(x);
}
#endif
}

Expand Down

0 comments on commit 1d87978

Please sign in to comment.