DEADSOFTWARE

implement SDL1.2 system driver
[d2df-sdl.git] / src / game / g_basic.pas
index bd3f50e76b3f2049e0ce6d9b41d63db4da9c8cf8..22e318ab4a442a24e36759d25e764053a2011e03 100644 (file)
@@ -2,8 +2,7 @@
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * the Free Software Foundation, version 3 of the License ONLY.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -690,6 +689,7 @@ var
   b: array of string;
   str: string;
 begin
+{
   SetLength(Result, 0);
   SetLength(b, 0);
 
@@ -716,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);
 
@@ -742,6 +742,8 @@ begin
       Result[High(Result)] := str;
     end;
   end;
+}
+  Result := nil
 end;
 
 procedure Sort(var a: SSArray);