Merge branch 'no-larval-crash'

* no-larval-crash:
  ames: don't crash on missing queued larval event

Signed-off-by: Jared Tobin <jared@tlon.io>
This commit is contained in:
Jared Tobin 2019-12-05 17:05:02 +08:00
commit 9d8a1845fc
No known key found for this signature in database
GPG Key ID: 0E4647D58F8A69E4
2 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8185eba8c879ae9f5c6572864426362d72e73376ada057daed03726e5dac9d1d
size 9506882
oid sha256:5b4c64d4be73ca2331d8f846f83a431c57143fafc85b6f96beeee6618d444be5
size 9510112

View File

@ -894,9 +894,15 @@
[~ larval-gate]
:: if crashed, print, dequeue, and set next drainage timer
::
:: TODO: cleanup duplicate iteration logic
::
?^ error.sign
:: .queued-events should never be ~ here, but if it is, don't crash
::
?: =(~ queued-events)
=/ =tang [leaf/"ames: cursed metamorphosis" u.error.sign]
=/ moves [duct %pass /larva-crash %d %flog %crud %larva tang]~
[moves adult-gate]
:: dequeue and discard crashed event
::
=. queued-events +:~(get to queued-events)
:: .queued-events has been cleared; metamorphose
::