hedgewars/uUtils.pas
changeset 14969 f27f00fabc0d
parent 14967 23fc5022bdea
child 15897 d7b53d08ad9c
--- a/hedgewars/uUtils.pas	Tue May 14 23:25:49 2019 +0300
+++ b/hedgewars/uUtils.pas	Tue May 14 22:42:19 2019 +0200
@@ -526,7 +526,7 @@
 end;
 
 procedure AddFileLogRaw(s: pchar); cdecl;
-var tmp: shortstring;
+var msgLine: PChar;
 begin
 s:= s;
 {$IFNDEF PAS2C}
@@ -535,15 +535,15 @@
 if SDL_LockMutex(logMutex) <> 0 then
     OutError('Logging mutex could not be locked!', true);
 {$ENDIF}
-tmp:= IntToStr(GameTicks) + ': ';
+msgLine:= Str2PChar(IntToStr(GameTicks) + ': ');
 if (logFile <> nil) then
     begin
-    pfsWriteRaw(logFile, Str2PChar(tmp), StrLen(Str2PChar(tmp)));
+    pfsWriteRaw(logFile, msgLine, StrLen(msgLine));
     pfsWriteRaw(logFile, s, StrLen(s));
     end
 else
     begin
-    Write(stdout, Str2PChar(tmp));
+    Write(stdout, msgLine);
     Flush(stdout);
     end;
 {$IFDEF USE_VIDEO_RECORDING}