Sfoglia il codice sorgente

* pmodules.finish_unit: fix condition that would lead to no implicit initialization code being generated if no explicit one is available, but an implicit one would be required

git-svn-id: trunk@34581 -
svenbarth 8 anni fa
parent
commit
da5bc92ae0
1 ha cambiato i file con 4 aggiunte e 2 eliminazioni
  1. 4 2
      compiler/pmodules.pas

+ 4 - 2
compiler/pmodules.pas

@@ -1145,8 +1145,10 @@ type
            is it needed at all? (Sergei) }
          { it's needed in case cnodeutils.force_init = true }
          if (force_init_final or cnodeutils.force_init) and
-            assigned(init_procinfo) and
-            has_no_code(init_procinfo.code) then
+            (
+              not assigned(init_procinfo) or
+              has_no_code(init_procinfo.code)
+            ) then
            begin
              { first release the not used init procinfo }
              if assigned(init_procinfo) then