ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/oup/current/DataAccess/Access_OniArchive.pas
(Generate patch)

Comparing oup/current/DataAccess/Access_OniArchive.pas (file contents):
Revision 241 by alloc, Tue Jul 17 22:27:16 2007 UTC vs.
Revision 321 by alloc, Wed May 6 13:47:23 2009 UTC

# Line 372 | Line 372 | var
372   begin
373    if fileid < GetFileCount then
374    begin
375 +    if not Assigned(Target) then
376 +      Target := TMemoryStream.Create;
377      if GetFileInfo(FileID).Size > 0 then
378      begin
377      if not Assigned(Target) then
378        Target := TMemoryStream.Create;
379        if not FDatOpened then
380          Fdat_file := TFileStream.Create(FFileName, fmOpenReadWrite);
381        Fdat_file.Seek(Fdat_files[fileid].DatAddr, soFromBeginning);
# Line 507 | Line 507 | begin
507      list := GetRawList(StrToInt(MidStr(dats.Strings[i], 1, 5)));
508      for j := 0 to Length(list) - 1 do
509      begin
510 <      if list[j].RawType = RawType then
510 >      if (list[j].RawType = RawType) and (list[j].RawSize > 0) then
511        begin
512          SetLength(Result, Length(Result)+1);
513          Result[High(Result)] := list[j];
# Line 588 | Line 588 | begin
588    if fileid < GetFileCount then
589    begin
590      raw_info := Self.GetRawInfo(FileID, DatOffset);
591 +    if raw_info.RawSize = 0 then
592 +      exit;
593      if not raw_info.LocSep then
594      begin
595        if not FRawOpened then

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)