From 63191aa1fc339b412390670ddf758d9f2ddad8f1 Mon Sep 17 00:00:00 2001 From: Shamus Hammons Date: Sat, 4 Jul 2020 11:09:52 -0500 Subject: [PATCH] Fix for bug #149; thanks to ggn for the patch. Now at v2.0.15. --- fltpoint.c | 3 ++- version.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fltpoint.c b/fltpoint.c index 2205a79..7e516fb 100644 --- a/fltpoint.c +++ b/fltpoint.c @@ -189,7 +189,8 @@ uint32_t DoubleToDSPFloat(double d) return 0x800000; } - return trunc(round(ldexp(d, 23))); + // The casts are here because some compilers do weird shit. See bug #149. + return (uint32_t)((int32_t)trunc(round(ldexp(d, 23)))); } diff --git a/version.h b/version.h index bcc6f2a..084a071 100644 --- a/version.h +++ b/version.h @@ -15,7 +15,7 @@ #define MAJOR 2 // Major version number #define MINOR 0 // Minor version number -#define PATCH 14 // Patch release number +#define PATCH 15 // Patch release number #endif // __VERSION_H__ -- 2.37.2