diff options
-rw-r--r-- | src/Windows/Registry.hs | 2 |
1 files changed, 1 insertions, 1 deletions
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 |