mirror of
https://code.sup39.dev/repos/Wqawg
synced 2024-12-27 17:44:52 +09:00
Fix infinite loop in getBundleR
This commit is contained in:
parent
7ced46d0c3
commit
088d166d13
1 changed files with 3 additions and 3 deletions
|
@ -437,7 +437,7 @@ getBundleR loomHash clothHash bundleHash = do
|
||||||
bundleID <- decodeKeyHashid404 bundleHash
|
bundleID <- decodeKeyHashid404 bundleHash
|
||||||
bundle <- get404 bundleID
|
bundle <- get404 bundleID
|
||||||
unless (bundleTicket bundle == clothID) notFound
|
unless (bundleTicket bundle == clothID) notFound
|
||||||
latest :| prevs <-
|
latest :| olds <-
|
||||||
case justHere proposal of
|
case justHere proposal of
|
||||||
Nothing -> error "Why didn't getCloth find any bundles"
|
Nothing -> error "Why didn't getCloth find any bundles"
|
||||||
Just bundles -> return bundles
|
Just bundles -> return bundles
|
||||||
|
@ -448,8 +448,8 @@ getBundleR loomHash clothHash bundleHash = do
|
||||||
Just ne -> return ne
|
Just ne -> return ne
|
||||||
let (prevs, mcurr) =
|
let (prevs, mcurr) =
|
||||||
if bundleID == latest
|
if bundleID == latest
|
||||||
then (prevs, Nothing)
|
then (olds, Nothing)
|
||||||
else ([] , Just latest)
|
else ([] , Just latest)
|
||||||
return (patches, prevs, mcurr)
|
return (patches, prevs, mcurr)
|
||||||
|
|
||||||
encodeRouteLocal <- getEncodeRouteLocal
|
encodeRouteLocal <- getEncodeRouteLocal
|
||||||
|
|
Loading…
Reference in a new issue