Ver código fonte

do_set: immediately exit in case of range error

Prevents run time error in case of a compiler compiled with range checks
enabled (webtbf/tw10890a)
Jonas Maebe 3 anos atrás
pai
commit
743d7c50d0
1 arquivos alterados com 4 adições e 1 exclusões
  1. 4 1
      compiler/ncnv.pas

+ 4 - 1
compiler/ncnv.pas

@@ -480,7 +480,10 @@ implementation
         procedure do_set(pos : longint);
           begin
             if (pos and not $ff)<>0 then
-             Message(parser_e_illegal_set_expr);
+              begin
+                Message(parser_e_illegal_set_expr);
+                exit;
+              end;
             if pos>constsethi then
              constsethi:=pos;
             if pos<constsetlo then