diff --git a/.gitattributes b/.gitattributes index 2ac80752d9..4d9ae53420 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7547,6 +7547,7 @@ tests/webtbs/tw7006.pp svneol=native#text/plain tests/webtbs/tw7071.pp svneol=native#text/plain tests/webtbs/tw7100.pp svneol=native#text/plain tests/webtbs/tw7104.pp svneol=native#text/plain +tests/webtbs/tw7105.pp svneol=native#text/plain tests/webtbs/tw7143.pp -text tests/webtbs/tw7161.pp svneol=native#text/plain tests/webtbs/tw7195.pp svneol=native#text/plain diff --git a/rtl/inc/real2str.inc b/rtl/inc/real2str.inc index 3e859bb254..c459f779e2 100644 --- a/rtl/inc/real2str.inc +++ b/rtl/inc/real2str.inc @@ -384,6 +384,7 @@ begin begin roundStr(temp,spos); d := frac(d); + dec(currprec); end; { calculate the necessary fractional digits } for fracCount := 1 to currPrec do diff --git a/tests/webtbs/tw7105.pp b/tests/webtbs/tw7105.pp new file mode 100644 index 0000000000..bc1c2bf016 --- /dev/null +++ b/tests/webtbs/tw7105.pp @@ -0,0 +1,19 @@ +var i:integer; + H:single; + s:string; + +begin + H:= 10; + for i:=1 to 25 do + begin + str(H:8,s); + if (s[1] <> ' ') or + (length(s) <> 8) then + begin + writeln(s); + halt(1); + end; + H:= H / 10.0; + end; +end. +