* Fixed reading beyond input string in fpc_Val_Real_ShortStr if empty string was passed.

git-svn-id: trunk@5849 -
This commit is contained in:
yury 2007-01-08 15:12:48 +00:00
parent a2f4c7fd2a
commit 697875f5af

View File

@ -908,6 +908,7 @@ begin
sign:=1;
while (code<=length(s)) and (s[code] in [' ',#9]) do
inc(code);
if code<=length(s) then
case s[code] of
'+' : inc(code);
'-' : begin
@ -919,7 +920,6 @@ begin
begin
{ Read integer part }
flags:=flags or 1;
fpc_Val_Real_ShortStr:=fpc_Val_Real_ShortStr*10+(ord(s[code])-ord('0'));
inc(code);
end;