Fixed up indexing a little bit
This commit is contained in:
parent
739afa9bd9
commit
6fbfbc0713
|
@ -9,6 +9,7 @@ Procedure Configuration_MessageBaseEditor;
|
|||
Implementation
|
||||
|
||||
Uses
|
||||
m_DateTime,
|
||||
m_Strings,
|
||||
m_FileIO,
|
||||
m_Bits,
|
||||
|
@ -316,6 +317,8 @@ Var
|
|||
Read (MBaseFile, TempBase);
|
||||
|
||||
If Result = TempBase.Index Then Begin
|
||||
If Result >= 2000000 Then Result := 0;
|
||||
|
||||
Inc (Result);
|
||||
Reset (MBaseFile);
|
||||
End;
|
||||
|
@ -331,7 +334,8 @@ Var
|
|||
FillChar (MBase, SizeOf(RecMessageBase), 0);
|
||||
|
||||
With MBase Do Begin
|
||||
Index := GetPermanentIndex(List.Picked);
|
||||
Index := GetPermanentIndex(FileSize(MBaseFile));
|
||||
Created := CurDateDos;
|
||||
FileName := 'new';
|
||||
Path := Config.MsgsPath;
|
||||
Name := 'New Base';
|
||||
|
@ -428,7 +432,8 @@ Begin
|
|||
'P' : If HasCopy And (List.Picked > 1) Then Begin
|
||||
AddRecord (MBaseFile, List.Picked, SizeOf(MBase));
|
||||
|
||||
Copied.Index := GetPermanentIndex(1);
|
||||
Copied.Index := GetPermanentIndex(FileSize(MBaseFile));
|
||||
Copied.Created := CurDateDos;
|
||||
|
||||
Write (MBaseFile, Copied);
|
||||
|
||||
|
|
Loading…
Reference in New Issue