Nicolas Cannasse пре 9 година
родитељ
комит
101ff55ea6
2 измењених фајлова са 11 додато и 2 уклоњено
  1. 1 1
      libs/ui/ui_win.c
  2. 10 1
      src/jit.c

+ 1 - 1
libs/ui/ui_win.c

@@ -94,7 +94,7 @@ HL_PRIM wref *HL_NAME(ui_winlog_new)( const uchar *title, int width, int height
 		(dtop.bottom - rc.bottom) / 2,
 		rc.right - rc.left,
 		rc.bottom - rc.top,
-		NULL,
+		GetActiveWindow(),
 		NULL,
 		GetModuleHandle(NULL),
 		NULL

+ 10 - 1
src/jit.c

@@ -1214,10 +1214,19 @@ static int prepare_call_args( jit_ctx *ctx, int count, int *args, vreg *vregs, b
 	return paddedSize;
 }
 
-static void hl_null_access() {
+#ifdef HL_VCC
+// prevent remove of push ebp which would prevent our stack from being correctly reported
+#	pragma optimize( "", off )
+#endif
+
+static void hl_null_access( uchar *str ) {
 	hl_error_msg(USTR("Null access"));
 }
 
+#ifdef HL_VCC
+#	pragma optimize( "", on )
+#endif
+
 static void call_native( jit_ctx *ctx, void *nativeFun, int size ) {
 	preg p;
 #	if defined(HL_WIN_CALL) && defined(HL_64)