Forráskód Böngészése

* Changed -1 to $FFFFFFFF on DWord writes to suppress range check errors

J. Gareth "Curious Kit" Moreton 3 éve
szülő
commit
bdd26766ed
1 módosított fájl, 7 hozzáadás és 7 törlés
  1. 7 7
      packages/chm/src/chmwriter.pas

+ 7 - 7
packages/chm/src/chmwriter.pas

@@ -1189,7 +1189,7 @@ begin
    if assigned(ftocsm) and (ftocsm.ImageList<>'') then
    if assigned(ftocsm) and (ftocsm.ImageList<>'') then
      FIDXHdrStream.writedwordLE(addstring(ftocsm.ImageList))
      FIDXHdrStream.writedwordLE(addstring(ftocsm.ImageList))
    else
    else
-     FIDXHdrStream.writedwordLE(-1);
+     FIDXHdrStream.writedwordLE($FFFFFFFF);
 
 
    // 18 0 (unknown)
    // 18 0 (unknown)
    FIDXHdrStream.writedwordLE(0);
    FIDXHdrStream.writedwordLE(0);
@@ -1204,25 +1204,25 @@ begin
    if assigned(ftocsm) then
    if assigned(ftocsm) then
      FIDXHdrStream.writedwordLE(ftocsm.Backgroundcolor)
      FIDXHdrStream.writedwordLE(ftocsm.Backgroundcolor)
    else
    else
-     FIDXHdrStream.writedwordLE(-1);
+     FIDXHdrStream.writedwordLE($FFFFFFFF);
 
 
    // 24 The value of the Foreground param of the "text/site properties" object of the sitemap contents
    // 24 The value of the Foreground param of the "text/site properties" object of the sitemap contents
    if assigned(ftocsm) then
    if assigned(ftocsm) then
      FIDXHdrStream.writedwordLE(ftocsm.Foregroundcolor)
      FIDXHdrStream.writedwordLE(ftocsm.Foregroundcolor)
    else
    else
-     FIDXHdrStream.writedwordLE(-1);
+     FIDXHdrStream.writedwordLE($FFFFFFFF);
 
 
    // 28 Offset in the #STRINGS file of the Font param of the "text/site properties" object of the sitemap contents (0/-1 = none)
    // 28 Offset in the #STRINGS file of the Font param of the "text/site properties" object of the sitemap contents (0/-1 = none)
    if assigned(ftocsm) and (ftocsm.Font<>'') then
    if assigned(ftocsm) and (ftocsm.Font<>'') then
      FIDXHdrStream.writedwordLE(addstring(ftocsm.font))
      FIDXHdrStream.writedwordLE(addstring(ftocsm.font))
    else
    else
-     FIDXHdrStream.writedwordLE(-1);
+     FIDXHdrStream.writedwordLE($FFFFFFFF);
 
 
    // 2C The value of the Window Styles param of the "text/site properties" object of the sitemap contents
    // 2C The value of the Window Styles param of the "text/site properties" object of the sitemap contents
    if assigned(ftocsm) then
    if assigned(ftocsm) then
      FIDXHdrStream.writedwordLE(FTocsm.WindowStyles)
      FIDXHdrStream.writedwordLE(FTocsm.WindowStyles)
    else
    else
-     FIDXHdrStream.writedwordLE(-1);
+     FIDXHdrStream.writedwordLE($FFFFFFFF);
 
 
    // 30 The value of the EXWindow Styles param of the "text/site properties" object of the sitemap contents
    // 30 The value of the EXWindow Styles param of the "text/site properties" object of the sitemap contents
    if assigned(ftocsm) then
    if assigned(ftocsm) then
@@ -1231,7 +1231,7 @@ begin
      FIDXHdrStream.writedwordLE(0);
      FIDXHdrStream.writedwordLE(0);
 
 
    // 34 Unknown. Often -1. Sometimes 0.
    // 34 Unknown. Often -1. Sometimes 0.
-   FIDXHdrStream.writedwordLE(-1);
+   FIDXHdrStream.writedwordLE($FFFFFFFF);
 
 
    // 38 Offset in the #STRINGS file of the FrameName param of the "text/site properties" object of the sitemap contents (0/-1 = none)
    // 38 Offset in the #STRINGS file of the FrameName param of the "text/site properties" object of the sitemap contents (0/-1 = none)
    if assigned(ftocsm) and (ftocsm.framename<>'') then
    if assigned(ftocsm) and (ftocsm.framename<>'') then
@@ -1243,7 +1243,7 @@ begin
    if assigned(ftocsm) and (ftocsm.windowname<>'') then
    if assigned(ftocsm) and (ftocsm.windowname<>'') then
      FIDXHdrStream.writedwordLE(addstring(FTocsm.windowname))
      FIDXHdrStream.writedwordLE(addstring(FTocsm.windowname))
    else
    else
-     FIDXHdrStream.writedwordLE(-1);
+     FIDXHdrStream.writedwordLE($FFFFFFFF);
    FIDXHdrStream.writedword(ntole(0));        // 40 Number of information types.
    FIDXHdrStream.writedword(ntole(0));        // 40 Number of information types.
    FIDXHdrStream.writedword(ntole(1));        // 44 Unknown. Often 1. Also 0, 3.
    FIDXHdrStream.writedword(ntole(1));        // 44 Unknown. Often 1. Also 0, 3.
    FIDXHdrStream.writedword(ntole(fmergefiles.count));        // 48 Number of files in the [MERGE FILES] list.
    FIDXHdrStream.writedword(ntole(fmergefiles.count));        // 48 Number of files in the [MERGE FILES] list.