X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_basic.pas;h=22e318ab4a442a24e36759d25e764053a2011e03;hb=0e101bd452c40da601236aaa2dd4106be47ddce1;hp=01a27b05ef21ccb9dcd247b8ce654884afce96c0;hpb=987c4a835a103345b59937e8e1be8524a6228712;p=d2df-sdl.git diff --git a/src/game/g_basic.pas b/src/game/g_basic.pas index 01a27b0..22e318a 100644 --- a/src/game/g_basic.pas +++ b/src/game/g_basic.pas @@ -689,6 +689,7 @@ var b: array of string; str: string; begin +{ SetLength(Result, 0); SetLength(b, 0); @@ -715,7 +716,7 @@ begin if TextLen(str) > MaxWidth then begin // Òåêóùàÿ ñòðîêà ñëèøêîì äëèííàÿ => ðàçáèâàåì - while str <> '' do + while (str[0] <> #0) and (str <> '') do begin SetLength(Result, Length(Result)+1); @@ -741,6 +742,8 @@ begin Result[High(Result)] := str; end; end; +} + Result := nil end; procedure Sort(var a: SSArray);