From 0ac2fb6dc89fafd146db05a9916b8e38a80c7e86 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 13 Dec 2016 19:43:46 +0300 Subject: bugfix --- src/Windows/Registry.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Windows/Registry.hs b/src/Windows/Registry.hs index 7a1ca2c..82abe9c 100644 --- a/src/Windows/Registry.hs +++ b/src/Windows/Registry.hs @@ -133,7 +133,7 @@ decodeString (_, bytes) = T.unpack dropLastZero where text = decodeUtf16LE bytes dropLastZero | T.null text = text - | otherwise = T.dropWhileEnd (== '\0') text + | otherwise = T.takeWhile (/= '\0') text openCloseCatch :: IsKeyPath a => a -> (Handle -> IO b) -> ExceptT IOError IO b openCloseCatch keyPath f = ExceptT $ catchIOError (openApplyClose >>= return . Right) $ return . Left -- cgit v1.2.3