1
0
Fork 0
mirror of https://code.sup39.dev/repos/Wqawg synced 2024-12-27 17:54:53 +09:00

Fix infinite loop in getBundleR

This commit is contained in:
fr33domlover 2022-09-27 18:08:59 +00:00
parent 7ced46d0c3
commit 088d166d13

View file

@ -437,7 +437,7 @@ getBundleR loomHash clothHash bundleHash = do
bundleID <- decodeKeyHashid404 bundleHash
bundle <- get404 bundleID
unless (bundleTicket bundle == clothID) notFound
latest :| prevs <-
latest :| olds <-
case justHere proposal of
Nothing -> error "Why didn't getCloth find any bundles"
Just bundles -> return bundles
@ -448,8 +448,8 @@ getBundleR loomHash clothHash bundleHash = do
Just ne -> return ne
let (prevs, mcurr) =
if bundleID == latest
then (prevs, Nothing)
else ([] , Just latest)
then (olds, Nothing)
else ([] , Just latest)
return (patches, prevs, mcurr)
encodeRouteLocal <- getEncodeRouteLocal