# HG changeset patch # User unc0rr # Date 1377324454 -14400 # Node ID 90fe753b36547fde81f7a45c08abbcbd3cc34f7c # Parent fa8324ed4702482163e7437a194989eb30b0ccf6 Fix 'non-exhaustive pattern' crash diff -r fa8324ed4702 -r 90fe753b3654 gameServer/OfficialServer/checker.hs --- a/gameServer/OfficialServer/checker.hs Sat Aug 24 13:33:34 2013 +0200 +++ b/gameServer/OfficialServer/checker.hs Sat Aug 24 10:07:34 2013 +0400 @@ -73,6 +73,7 @@ , "--prefix", "/usr/home/unC0Rr/Sources/Hedgewars/Releases/0.9.19/share/hedgewars/Data" , "--nomusic" , "--nosound" + , "--stats-only" ]) {std_err = CreatePipe} hSetBuffering hOut LineBuffering diff -r fa8324ed4702 -r 90fe753b3654 gameServer/OfficialServer/extdbinterface.hs --- a/gameServer/OfficialServer/extdbinterface.hs Sat Aug 24 13:33:34 2013 +0200 +++ b/gameServer/OfficialServer/extdbinterface.hs Sat Aug 24 10:07:34 2013 +0400 @@ -60,6 +60,7 @@ parseStats :: B.ByteString -> [(B.ByteString, B.ByteString)] -> [B.ByteString] -> [[SqlValue]] parseStats fileName teams = ps where + ps [] = [] ps ("DRAW" : bs) = ps bs ps ("WINNERS" : n : bs) = ps $ drop (readInt_ n) bs ps ("ACHIEVEMENT" : typ : teamname : location : value : bs) = @@ -69,6 +70,8 @@ , SqlByteString fileName , SqlByteString location ] : ps bs + ps (b:bs) = ps bs + dbConnectionLoop mySQLConnectionInfo = Control.Exception.handle (\(e :: IOException) -> hPutStrLn stderr $ show e) $ handleSqlError $