aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/Windows
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-12-13 19:43:46 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-12-13 19:43:46 +0300
commit0ac2fb6dc89fafd146db05a9916b8e38a80c7e86 (patch)
tree5d53808cc05b6e3ceb512ab1fbeae46cb95887fc /src/Windows
parentbugfix (diff)
downloadwindows-env-0ac2fb6dc89fafd146db05a9916b8e38a80c7e86.tar.gz
windows-env-0ac2fb6dc89fafd146db05a9916b8e38a80c7e86.zip
bugfix
Diffstat (limited to 'src/Windows')
-rw-r--r--src/Windows/Registry.hs2
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