Fixed List index out of bounds bug while saving a single flame.
This commit is contained in:
parent
a885e4252b
commit
d116ed5874
@ -1467,15 +1467,21 @@ begin
|
|||||||
FileList[0] := '<Flames name="' + Tag + '">';
|
FileList[0] := '<Flames name="' + Tag + '">';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if pos('<flame ', FileList.text) <> 0 then
|
if FileList.Count > 2 then
|
||||||
repeat
|
begin
|
||||||
FileList.Delete(FileList.Count - 1);
|
if pos('<flame ', FileList.text) <> 0 then
|
||||||
until (Pos('</flame>', FileList[FileList.count - 1]) <> 0)
|
repeat
|
||||||
else
|
FileList.Delete(FileList.Count - 1);
|
||||||
repeat
|
until (Pos('</flame>', FileList[FileList.count - 1]) <> 0)
|
||||||
FileList.Delete(FileList.Count - 1);
|
else
|
||||||
until (Pos('<' + Tag + '>', FileList[FileList.count - 1]) <> 0) or
|
repeat
|
||||||
(Pos('</Flames>', FileList[FileList.count - 1]) <> 0);
|
FileList.Delete(FileList.Count - 1);
|
||||||
|
until (Pos('<' + Tag + '>', FileList[FileList.count - 1]) <> 0) or
|
||||||
|
(Pos('</Flames>', FileList[FileList.count - 1]) <> 0);
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
FileList.Delete(FileList.Count - 1);
|
||||||
|
end;
|
||||||
|
|
||||||
FileList.Add(Trim(FlameToXML(cp1, false)));
|
FileList.Add(Trim(FlameToXML(cp1, false)));
|
||||||
FileList.Add('</Flames>');
|
FileList.Add('</Flames>');
|
||||||
|
Loading…
Reference in New Issue
Block a user