From 899f76718f34761d4bc70354c67c508821a0e7c1 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Thu, 3 Nov 2011 22:22:20 +0100 Subject: Fixed the fix to properly handle incomplete messages when there is nothing more to read. --- Hsbot/Core.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Hsbot/Core.hs b/Hsbot/Core.hs index 43276f9..d454c77 100644 --- a/Hsbot/Core.hs +++ b/Hsbot/Core.hs @@ -120,7 +120,7 @@ botReader env handle mctx chan = do errorM "Hsbot.Reader" $ "Reader decode error (" ++ show err ++ ") on " ++ str botTrueReader "" messages = do - msgs <- many1 message + msgs <- option [] $ many1 message trash <- option "" $ many1 anyChar return (msgs, trash) message = do -- cgit v1.2.3