Browse Source

fixed hl_assert stack reporting

ncannasse 7 years ago
parent
commit
1422cd13d6
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/std/error.c

+ 7 - 1
src/std/error.c

@@ -191,10 +191,16 @@ HL_PRIM bool hl_detect_debugger() {
 #	endif
 }
 
-HL_PRIM void hl_assert() {
+#ifdef HL_VCC
+#	pragma optimize( "", off )
+#endif
+HL_PRIM HL_NO_OPT void hl_assert() {
 	hl_debug_break();
 	hl_error("Assert");
 }
+#ifdef HL_VCC
+#	pragma optimize( "", on )
+#endif
 
 #define _SYMBOL _ABSTRACT(hl_symbol)