Skip to content

Commit

Permalink
Fix #3241: regSetStringValue passed the wrong value for the length
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmar committed Jun 1, 2009
1 parent fbfb0ea commit 532169c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion System/Win32/Registry.hsc
Expand Up @@ -491,7 +491,7 @@ type RegValueType = DWORD
regSetStringValue :: HKEY -> String -> String -> IO ()
regSetStringValue hk key val =
withTString val $ \ v ->
regSetValueEx hk key rEG_SZ v (length val)
regSetValueEx hk key rEG_SZ v (length val * sizeOf (undefined::TCHAR))

regSetValueEx :: HKEY -> String -> RegValueType -> LPTSTR -> Int -> IO ()
regSetValueEx key subkey ty value value_len =
Expand Down

0 comments on commit 532169c

Please sign in to comment.