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