diff -r cac1d5601d7c -r 302408e45052 hedgewars/uConsole.pas --- a/hedgewars/uConsole.pas Mon Sep 26 00:03:14 2011 +0200 +++ b/hedgewars/uConsole.pas Mon Sep 26 01:16:15 2011 +0200 @@ -91,6 +91,12 @@ {$ENDIF} end; +function ShortStringAsPChar(s: ShortString) : PChar; +begin + if Length(S) = High(s) then Dec(s[0]); + s[Ord(Length(s))+1] := #0; + Result := @S[1]; +end; function GetLastConsoleLine: shortstring; var valueStr: shortstring; @@ -125,12 +131,4 @@ end; -Function ShortStringAsPChar(S: ShortString) : PChar; -Var NewString : String; -Begin -if Length(S) = High(S) then Dec(S[0]); -s[Ord(Length(s))+1] := #0; -Result := @S[1]; -End; - end.