From 2afe20c5b7a537b6c71ebfb909b8acab9d7c58cc Mon Sep 17 00:00:00 2001 From: Fellippe Heitor Date: Thu, 29 Jul 2021 18:32:04 -0300 Subject: [PATCH] Fixes call to `System` breaking $DEBUG mode. --- source/qb64.bas | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/qb64.bas b/source/qb64.bas index 3e42a0a7c..bb0e8382a 100644 --- a/source/qb64.bas +++ b/source/qb64.bas @@ -8911,8 +8911,10 @@ DO IF vWatchOn = 1 THEN - vWatchAddLabel linenumber, 0 - PRINT #12, "*__LONG_VWATCH_LINENUMBER= 0; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars); if (*__LONG_VWATCH_GOTO>0) goto VWATCH_SETNEXTLINE; if (*__LONG_VWATCH_GOTO<0) goto VWATCH_SKIPLINE;" + IF inclinenumber(inclevel) = 0 THEN + vWatchAddLabel linenumber, 0 + END IF + PRINT #12, "*__LONG_VWATCH_LINENUMBER= 0; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars);" END IF PRINT #12, "if (sub_gl_called) error(271);" PRINT #12, "close_program=1;" @@ -22803,6 +22805,7 @@ END FUNCTION SUB xend IF vWatchOn = 1 THEN + 'check if closedmain = 0 in case a main module ends in an include. IF (inclinenumber(inclevel) = 0 OR closedmain = 0) THEN vWatchAddLabel 0, -1 PRINT #12, "*__LONG_VWATCH_LINENUMBER= 0; SUB_VWATCH((ptrszint*)vwatch_global_vars,(ptrszint*)vwatch_local_vars);" END IF