summaryrefslogtreecommitdiffstats
path: root/src/registrytool.cpp
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2012-12-16 05:41:25 +0000
committer~suv <suv-sf@users.sourceforge.net>2012-12-16 05:41:25 +0000
commit7ec903c9898f872dbd9426ed7a62e1969fdb7be7 (patch)
treea306139e829118a83516af02279c9eafd3440eaa /src/registrytool.cpp
parentHershey Text: whitespace; py: docstring, modeline; inx: fix attribute value (diff)
parentTranslations.Spanish translation update by Lucas Vieites. (diff)
downloadinkscape-7ec903c9898f872dbd9426ed7a62e1969fdb7be7.tar.gz
inkscape-7ec903c9898f872dbd9426ed7a62e1969fdb7be7.zip
merge from trunk (r11955)
(bzr r11687.1.3)
Diffstat (limited to 'src/registrytool.cpp')
-rw-r--r--src/registrytool.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/registrytool.cpp b/src/registrytool.cpp
index d2cec0080..72b53821e 100644
--- a/src/registrytool.cpp
+++ b/src/registrytool.cpp
@@ -70,6 +70,7 @@ bool RegistryTool::setStringValue(const Glib::ustring &keyNameArg,
//Get or create the key
gunichar2 *keyw = g_utf8_to_utf16(keyName.data(), -1, 0,0,0);
gunichar2 *valuenamew = g_utf8_to_utf16(valueName.data(), -1, 0,0,0);
+ gunichar2 *valuew = g_utf8_to_utf16(value.data(), -1, 0,0,0);
HKEY key;
if (RegCreateKeyExW(rootKey, (WCHAR*) keyw,
@@ -82,7 +83,7 @@ bool RegistryTool::setStringValue(const Glib::ustring &keyNameArg,
// Set the value
if (RegSetValueExW(key, (WCHAR*) valuenamew,
- 0, REG_SZ, (LPBYTE) value.data(), (DWORD) (value.size() + 1)))
+ 0, REG_SZ, (LPBYTE) valuew, (DWORD) (2*value.size() + 2)))
{
fprintf(stderr, "RegistryTool: Could not set the value '%s'\n", value.c_str());
goto failkey;