Browse Source

* Fixed dynamic array sizes

sg 25 years ago
parent
commit
a56684bb8a
1 changed files with 7 additions and 4 deletions
  1. 7 4
      fcl/inc/gettext.pp

+ 7 - 4
fcl/inc/gettext.pp

@@ -43,14 +43,14 @@ type
     offset: LongWord;
     offset: LongWord;
   end;
   end;
 
 
-  TMOStringTable = array[LongWord] of TMOStringInfo;
+  TMOStringTable = array[0..(1 shl 30) div SizeOf(TMOStringInfo)] of TMOStringInfo;
   PMOStringTable = ^TMOStringTable;
   PMOStringTable = ^TMOStringTable;
 
 
 
 
-  TLongWordArray = array[LongWord] of LongWord;
+  TLongWordArray = array[0..(1 shl 30) div SizeOf(LongWord)] of LongWord;
   PLongWordArray = ^TLongWordArray;
   PLongWordArray = ^TLongWordArray;
 
 
-  TPCharArray = array[LongWord] of PChar;
+  TPCharArray = array[0..(1 shl 30) div SizeOf(PChar)] of PChar;
   PPCharArray = ^TPCharArray;
   PPCharArray = ^TPCharArray;
 
 
   TMOFile = class
   TMOFile = class
@@ -271,7 +271,10 @@ end.
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.10  2000-02-17 22:14:51  sg
+  Revision 1.11  2000-02-20 10:59:11  sg
+  * Fixed dynamic array sizes
+
+  Revision 1.10  2000/02/17 22:14:51  sg
   * Now calls "ResetResourceTables" on unit finalization if gettext has been
   * Now calls "ResetResourceTables" on unit finalization if gettext has been
     used. This enabled programs using gettext to use heaptrc, which reported
     used. This enabled programs using gettext to use heaptrc, which reported
     memory leaks for the translated strings until now.
     memory leaks for the translated strings until now.