Browse Source

dtoolbase: Fix test failure on 32-bit Windows with pftoa

rdb 1 year ago
parent
commit
50b984cffd
1 changed files with 6 additions and 0 deletions
  1. 6 0
      dtool/src/dtoolbase/pdtoa.cxx

+ 6 - 0
dtool/src/dtoolbase/pdtoa.cxx

@@ -32,6 +32,8 @@ THE SOFTWARE.
 #include <intrin.h>
 #include <float.h>
 #define copysign _copysign
+
+#pragma float_control(precise, on, push)
 #endif
 
 #define UINT64_C2(h, l) ((static_cast<uint64_t>(h) << 32) | static_cast<uint64_t>(l))
@@ -586,3 +588,7 @@ void pftoa(float value, char *buffer) {
     }
   }
 }
+
+#ifdef _MSC_VER
+#pragma float_control(pop)
+#endif