aboutsummaryrefslogtreecommitdiff
path: root/Config
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-03-18 13:13:33 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-03-18 13:13:33 -0400
commit19dad744be43c071b824f990dbeb1d6ed19b301e (patch)
tree0c0330fa4a516a2e0014042f933988f2fadfeb59 /Config
parentbbe8d8acdaad342df919a866ddbb231e403827b8 (diff)
minor robustness fixes in repo cost reordering code
Diffstat (limited to 'Config')
-rw-r--r--Config/Cost.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Config/Cost.hs b/Config/Cost.hs
index 94bab1fe1..dc391a5a5 100644
--- a/Config/Cost.hs
+++ b/Config/Cost.hs
@@ -42,7 +42,7 @@ encryptedRemoteCostAdj = 50
- position longer than the list.
-}
insertCostAfter :: [Cost] -> Int -> [Cost]
-insertCostAfter [] _ = error "insertCostAfter: empty list"
+insertCostAfter [] _ = []
insertCostAfter l pos
| pos < 0 = costBetween 0 (l !! 0) : l
| nextpos > maxpos = l ++ [1 + l !! maxpos]