summaryrefslogtreecommitdiff
path: root/Config.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Config.hs')
-rw-r--r--Config.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/Config.hs b/Config.hs
index 568eb7138..493a90700 100644
--- a/Config.hs
+++ b/Config.hs
@@ -51,11 +51,10 @@ remoteCost r def = do
else getConfig r "cost" ""
where
safeparse v
- | null ws || null ps = def
- | otherwise = (fst . head) ps
+ | null ws = def
+ | otherwise = fromMaybe def $ readMaybe $ head ws
where
ws = words v
- ps = reads $ head ws
cheapRemoteCost :: Int
cheapRemoteCost = 100