clay: don't underflow when patch produces empty file

Fixes #2602

I haven't been able to reproduce this bug, but I can see how it could
happen in theory.  This should resolve the issue.
This commit is contained in:
Philip Monk 2020-03-31 11:33:10 -07:00
parent 12f150659b
commit 5a4786169d
No known key found for this signature in database
GPG Key ID: B66E1F02604E44EC
2 changed files with 4 additions and 2 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0b317cdb5fccee9afbebd16a3f5ff14a0138af893e9ca03da4af6effb34ea2bd
size 13101105
oid sha256:c9609b017c0fb9e4797e6a5f6e1052ae70725b4178f8ba18e7cef3c6ed1489c5
size 13109549

View File

@ -2563,6 +2563,8 @@
=+ dif=;;((urge cord) q.r.bol)
=, format
=+ pac=(of-wain (lurk:differ (to-wain (cat 3 txt '\0a')) dif))
?~ pac
''
(end 3 (dec (met 3 pac)) pac)
::
:: Traverse an ankh.