Prevent server from crashing when get SqlNull value
authorunc0rr
Sun, 12 Apr 2009 15:35:22 +0000
changeset 1970 130e7805d49c
parent 1969 3b04393b1291
child 1971 c90c7c5fd37a
Prevent server from crashing when get SqlNull value
gameServer/OfficialServer/DBInteraction.hs
--- a/gameServer/OfficialServer/DBInteraction.hs	Sun Apr 12 15:33:59 2009 +0000
+++ b/gameServer/OfficialServer/DBInteraction.hs	Sun Apr 12 15:35:22 2009 +0000
@@ -51,7 +51,7 @@
 							ClientAccountInfo (clientUID client) $
 								HasAccount
 									(fromSql $ head $ fromJust $ passAndRole)
-									((fromSql $ last $ fromJust $ passAndRole) == (3 :: Int))
+									((fromSql $ last $ fromJust $ passAndRole) == (Just (3 :: Int)))
 					else
 					writeChan coreChan $ ClientAccountInfo (clientUID client) Guest
 			`onException`