mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-25 01:29:22 +02:00
* 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:
parent
a2f4c7fd2a
commit
697875f5af
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user