Procházet zdrojové kódy

fixed sse rounding mode

Nicolas Cannasse před 9 roky
rodič
revize
972083280e
1 změnil soubory, kde provedl 2 přidání a 0 odebrání
  1. 2 0
      src/main.c

+ 2 - 0
src/main.c

@@ -21,6 +21,7 @@
  */
  */
 #include <hl.h>
 #include <hl.h>
 #include <hlmodule.h>
 #include <hlmodule.h>
+#include <fenv.h>
 
 
 #ifdef HL_VCC
 #ifdef HL_VCC
 #	include <crtdbg.h>
 #	include <crtdbg.h>
@@ -90,6 +91,7 @@ int main(int argc, char *argv[]) {
 #	endif
 #	endif
 	hl_global_init(&ctx);
 	hl_global_init(&ctx);
 	hl_sys_init(argv + 2,argc - 2);
 	hl_sys_init(argv + 2,argc - 2);
+	fesetround(FE_TOWARDZERO);
 	ctx.code = load_code(argv[1]);
 	ctx.code = load_code(argv[1]);
 	if( ctx.code == NULL )
 	if( ctx.code == NULL )
 		return 1;
 		return 1;