Browse Source

* reraise has to reset the ref. count to 0

git-svn-id: branches/debug_eh@41383 -
florian 6 years ago
parent
commit
b1cc02e417
1 changed files with 3 additions and 2 deletions
  1. 3 2
      rtl/inc/psabieh.inc

+ 3 - 2
rtl/inc/psabieh.inc

@@ -1201,8 +1201,9 @@ procedure fpc_ReRaise; [public,alias:'FPC_RERAISE']; compilerproc;
 {$endif FPC_PSABIEH_CPLUSPLUSSUPPORT}
 {$endif FPC_PSABIEH_CPLUSPLUSSUPPORT}
         else
         else
           begin
           begin
-            { undo the begin_catch }
-            dec(_ExceptObjectStack^.refcount);
+            { reraise has to reset the refcount, this is also what the
+              generic exception handling does }
+            _ExceptObjectStack^.refcount := 0;
           end;
           end;
 
 
 {$ifdef excdebug}
 {$ifdef excdebug}