diff -r 8ae48e3b02d9 -r 2457fcc0dcd9 hedgewars/uLand.pas --- a/hedgewars/uLand.pas Sat Feb 14 16:51:10 2009 +0000 +++ b/hedgewars/uLand.pas Sat Feb 14 16:54:28 2009 +0000 @@ -640,11 +640,8 @@ procedure LoadMap; var tmpsurf: PSDL_Surface; - s: string; - a,b: shortstring; - f: textfile; - tn: Longint; - + s: string; + f: textfile; begin WriteLnToConsole('Loading land from file...'); AddProgress; @@ -656,9 +653,9 @@ WriteLnToConsole('Fetching map HH limit'); Assign(f, s); Reset(f); -Readln(f, a); -SplitBySpace(a,b); -Val(b,MaxHedgehogs,tn); +Readln(f); +if not eof(f) then Readln(f, MaxHedgehogs); + if(MaxHedgehogs = 0) then MaxHedgehogs:= 18; playHeight:= tmpsurf^.h;