mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 21:29:31 +02:00
* fixed the encoding of negative integers in BAS_EncodeNumber
git-svn-id: branches/z80@44593 -
This commit is contained in:
parent
686022c971
commit
f7c213738e
@ -135,13 +135,8 @@ begin
|
|||||||
if (N >= -65535) and (N <= 65535) then
|
if (N >= -65535) and (N <= 65535) then
|
||||||
begin
|
begin
|
||||||
Str(N, Result);
|
Str(N, Result);
|
||||||
if N >= 0 then
|
N := Abs(N);
|
||||||
Result := Result + #14#0#0 + Chr(Byte(N)) + Chr(Byte(N shr 8)) + #0
|
Result := Result + #14#0#0 + Chr(Byte(N)) + Chr(Byte(N shr 8)) + #0;
|
||||||
else
|
|
||||||
begin
|
|
||||||
N := Word(N + 131072);
|
|
||||||
Result := Result + #14#0#255 + Chr(Byte(N)) + Chr(Byte(N shr 8)) + #0;
|
|
||||||
end;
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Result := BAS_EncodeNumber(Real(N));
|
Result := BAS_EncodeNumber(Real(N));
|
||||||
|
Loading…
Reference in New Issue
Block a user