Fix bug in structures that don't use TYPER sizes.

Thanks Frank!
This commit is contained in:
Brad Nelson
2023-07-07 16:16:00 -07:00
parent a5f9ca1b35
commit 998d619355
3 changed files with 17 additions and 2 deletions

View File

@ -28,7 +28,8 @@ long-size long-size typer long
variable last-struct
: struct ( "name" ) 1 0 typer latestxt >body last-struct ! ;
: struct ( "name" ) 1 0 typer latestxt >body last-struct !
1 last-align ! ;
: align-by ( a n -- a ) 1- dup >r + r> invert and ;
: struct-align ( n -- )
dup last-struct @ cell+ @ max last-struct @ cell+ !