mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-05 23:22:25 +00:00
fixes "memory past end of source var" warning, solution by @kekcleader;
issue: https://github.com/vishaps/voc/issues/96
This commit is contained in:
parent
3d62284b32
commit
bc8adf76c1
1 changed files with 9 additions and 1 deletions
|
|
@ -672,7 +672,15 @@ Especially Length would become fairly complex.
|
|||
|
||||
PROCEDURE WriteSet* (VAR R: Rider; x: SET);
|
||||
VAR b: ARRAY 4 OF CHAR; i: LONGINT;
|
||||
BEGIN i := SYSTEM.VAL(LONGINT, x);
|
||||
y: SYSTEM.SET64;
|
||||
BEGIN
|
||||
IF SIZE(SET) = SIZE(INTEGER) THEN
|
||||
i := SYSTEM.VAL(INTEGER, x);
|
||||
ELSE
|
||||
y := x;
|
||||
i := SYSTEM.VAL(LONGINT, y);
|
||||
END;
|
||||
|
||||
b[0] := CHR(i); b[1] := CHR(i DIV 100H); b[2] := CHR(i DIV 10000H); b[3] := CHR(i DIV 1000000H);
|
||||
WriteBytes(R, b, 4);
|
||||
END WriteSet;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue