mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-27 17:30:25 +02:00
* more range check fixes (more serious this time) from mantis 16669
* one more writeln under chm_debug to avoid problems with gui-only apps. git-svn-id: trunk@15397 -
This commit is contained in:
parent
0a164b4467
commit
909ffa4ee3
@ -356,7 +356,9 @@ var
|
||||
end;
|
||||
begin
|
||||
if FItemCount < 1 then begin
|
||||
{$ifdef chm_debug}
|
||||
WriteLn('WHAT ARE YOU DOING!!');
|
||||
{$endif}
|
||||
Dec(AIndex);
|
||||
Exit;
|
||||
end;
|
||||
|
@ -1371,7 +1371,8 @@ function TChmWriter.AddURL ( AURL: String; TopicsIndex: DWord ) : LongWord;
|
||||
FAvlUrlStr.Add(UrlStrRec);
|
||||
FURLSTRStream.WriteDWord(NToLE(DWord(0))); // URL Offset for topic after the the "Local" value
|
||||
FURLSTRStream.WriteDWord(NToLE(DWord(0))); // Offset of FrameName??
|
||||
FURLSTRStream.Write(AString[1], Length(AString));
|
||||
if Length(AString) > 0 then
|
||||
FURLSTRStream.Write(AString[1], Length(AString));
|
||||
FURLSTRStream.WriteByte(0); //NT
|
||||
end;
|
||||
|
||||
@ -1390,7 +1391,7 @@ function TChmWriter.AddURL ( AURL: String; TopicsIndex: DWord ) : LongWord;
|
||||
var UrlIndex : Integer;
|
||||
|
||||
begin
|
||||
if AURL[1] = '/' then Delete(AURL,1,1);
|
||||
if (Length(AURL) > 0) and (AURL[1] = '/') then Delete(AURL,1,1);
|
||||
UrlIndex:=LookupUrlString(AUrl);
|
||||
|
||||
//if $1000 - (FURLTBLStream.Size mod $1000) = 4 then // we are at 4092
|
||||
|
Loading…
Reference in New Issue
Block a user