View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003966 | JEDI VCL | 00 JVCL Components | public | 2006-10-21 09:06 | 2006-11-22 12:27 |
Reporter | Nazgul | Assigned To | AHUser | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.20 | ||||
Target Version | Fixed in Version | ||||
Summary | 0003966: TJvXmlTree.ParseXML fails if Lines.Count = 0 | ||||
Description | If TJvXMLTree.ParseXML is called and Lines.Count is zero, an exception "List index out of bounds (0)" is raised. | ||||
Additional Information | I fixed this issue (changed the repeat...until cycle to while...do). Checked the attached patch. | ||||
Tags | No tags attached. | ||||
2006-10-21 09:06
|
JvXMLTree.pas.patch (576 bytes)
--- E:/bds4/Imports/jvcl/run/__history/JvXmlTree.pas.~1~ Thu Feb 17 11:21:20 2005 +++ E:/bds4/Imports/jvcl/run/JvXmlTree.pas Sat Oct 21 16:30:24 2006 @@ -1336,7 +1336,9 @@ Name := 'root'; N := Self; C := Lines.Count - 1; - repeat +// repeat + while I <= C do + begin S := Lines[I]; Token := Copy(S, 1, 3); AName := Copy(S, 4, Length(S)); @@ -1364,7 +1366,8 @@ N.ValueType := xvtCDATA; end; Inc(I); - until I > C; + //until I > C; + end; end; procedure TJvXMLTree.LoadFromFile(const FileName: string); |
|
Fixed in SVN. Thanks for the patch. |
Date Modified | Username | Field | Change |
---|---|---|---|
2006-10-21 09:06 | Nazgul | New Issue | |
2006-10-21 09:06 | Nazgul | File Added: JvXMLTree.pas.patch | |
2006-11-22 12:26 | AHUser | Status | new => resolved |
2006-11-22 12:26 | AHUser | Resolution | open => fixed |
2006-11-22 12:26 | AHUser | Assigned To | => AHUser |
2006-11-22 12:26 | AHUser | Note Added: 0010442 |