mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-20 23:37:56 +03:00
Reproduce malloc error (on M1 Mac at least)
This commit is contained in:
parent
443bb28f1b
commit
4fa98e964e
@ -97,8 +97,8 @@ update = \model, event ->
|
||||
tick : Model -> Model
|
||||
tick = \model ->
|
||||
model
|
||||
|> moveBall
|
||||
|> updateBlocks
|
||||
#|> moveBall
|
||||
#|> updateBlocks
|
||||
|
||||
moveBall : Model -> Model
|
||||
moveBall = \model ->
|
||||
@ -157,8 +157,15 @@ render : Model -> List Elem
|
||||
render = \model ->
|
||||
blockWidth = model.width / numCols
|
||||
|
||||
blocks =
|
||||
# Drop the conditional to fix the malloc error
|
||||
if True then
|
||||
initBlocks model.width
|
||||
else
|
||||
model.blocks
|
||||
|
||||
rects =
|
||||
List.joinMap model.blocks \{ left, top, color, status } ->
|
||||
List.joinMap blocks \{ left, top, color, status } ->
|
||||
border = blockBorder * blockWidth
|
||||
alpha =
|
||||
when status is
|
||||
|
Loading…
Reference in New Issue
Block a user