mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-28 19:55:53 +03:00
Merge pull request #5412 from urbit/jb/safer-dojo
dojo: improve safety of mark conversion
This commit is contained in:
commit
5c20b63a5a
@ -902,6 +902,9 @@
|
||||
%dv (dy-sing hand+q.bil %a p.bil (snoc q.bil %hoon))
|
||||
%ge (dy-run-generator (dy-cage p.p.p.bil) q.p.bil)
|
||||
%sa
|
||||
=/ has-mark .?((get-fit:clay he-beak %mar p.bil))
|
||||
?. has-mark
|
||||
(he-diff(poy ~) %tan leaf+"dojo: %{(trip p.bil)} missing" ~)
|
||||
=+ .^(=dais:clay cb+(en-beam he-beak /[p.bil]))
|
||||
(dy-hand p.bil *vale:dais)
|
||||
::
|
||||
@ -910,8 +913,12 @@
|
||||
=/ has-mark .?((get-fit:clay he-beak %mar p.bil))
|
||||
?. has-mark :: yolo
|
||||
(dy-hand p.bil q.cag)
|
||||
=+ .^(=tube:clay cc+(en-beam he-beak /[p.cag]/[p.bil]))
|
||||
(dy-hand p.bil (tube q.cag))
|
||||
=/ res
|
||||
=+ .^(=tube:clay cc+(en-beam he-beak /[p.cag]/[p.bil]))
|
||||
(mule |.((tube q.cag)))
|
||||
?: ?=(%| -.res)
|
||||
(he-diff(poy ~) %tan leaf+"dojo: %as %{(trip p.bil)} failed" p.res)
|
||||
(dy-hand p.bil p.res)
|
||||
::
|
||||
%do
|
||||
=/ gat (dy-eval p.bil)
|
||||
|
Loading…
Reference in New Issue
Block a user