Engine:
* Redirect debug log to stderr in case no path was provided (e.g. run from command line)
--- a/hedgewars/uMisc.pas Wed Feb 10 17:31:12 2010 +0000
+++ b/hedgewars/uMisc.pas Wed Feb 10 17:53:21 2010 +0000
@@ -736,13 +736,18 @@
{$IFDEF IPHONEOS}
f:= stderr;
{$ELSE}
- for i:= 0 to 7 do
- begin
- assign(f, ParamStr(1) + '/debug' + inttostr(i) + '.txt');
- rewrite(f);
- if IOResult = 0 then break;
- end;
- if IOResult <> 0 then f:= stderr; // if everything fails, write to stderr
+ if ParamStr(1) <> '' then
+ begin
+ for i:= 0 to 7 do
+ begin
+ assign(f, ParamStr(1) + '/debug' + inttostr(i) + '.txt');
+ rewrite(f);
+ if IOResult = 0 then break;
+ end;
+ if IOResult <> 0 then f:= stderr; // if everything fails, write to stderr
+ end
+ else
+ f:= stderr;
{$ENDIF}
{$I+}
{$ENDIF}