hedgewars/uMisc.pas
changeset 497 adf1aee202c6
parent 495 62c1c2b4414c
child 529 812682c1ab62
--- a/hedgewars/uMisc.pas	Thu Mar 15 02:20:31 2007 +0000
+++ b/hedgewars/uMisc.pas	Thu Mar 15 22:46:37 2007 +0000
@@ -253,9 +253,10 @@
 
 {$IFDEF DEBUGFILE}
 {$I-}
-for i:= 0 to 7 do
+if ParamCount > 0 then
+  for i:= 0 to 7 do
     begin
-    Assign(f, 'debug' + inttostr(i) + '.txt');
+    Assign(f, ParamStr(1) + '/debug' + inttostr(i) + '.txt');
     rewrite(f);
     if IOResult = 0 then break
     end;