OSDN Git Service

Fix PrintSurfaceImage -- Invalid file name might be used
authornaru <bottle@mikage.to>
Mon, 5 Jan 2004 22:14:14 +0000 (22:14 +0000)
committernaru <bottle@mikage.to>
Mon, 5 Jan 2004 22:14:14 +0000 (22:14 +0000)
bottleclient/Logs.pas

index 2656488..a8d88f3 100755 (executable)
@@ -635,14 +635,13 @@ function TBottleLogList.PrintSurfaceImage(Strs: TStringList; const Ghost: String
   ID: integer; const Options: THTMLOutputOptions): boolean;
 var
   Bmp: TBitmap;
-  Graphic: TGraphic;
   Path, Ext, Name: String;
 begin
   Result := false;
   if (ID < 0) or (Ghost = '') then
     Exit;
   Ext := 'bmp';
-  Name := Format('%s,%d.%s', [Ghost, ID, Ext]);
+  Name := Format('%s,%d.%s', [SafeFileName(Ghost), ID, Ext]);
   if FImageFiles.IndexOf(Name) >= 0 then
   begin
     Strs.Add(Format('      <img src="%s\%s" alt="%s,%d">',