diff --git a/xpinstall/src/nsWinReg.cpp b/xpinstall/src/nsWinReg.cpp index 87d30cfde45..2a775750109 100644 --- a/xpinstall/src/nsWinReg.cpp +++ b/xpinstall/src/nsWinReg.cpp @@ -342,7 +342,7 @@ nsWinReg::NativeSetValueString(const nsString& subkey, const nsString& valname, char* valnameCString = valname.ToNewCString(); char* valueCString = value.ToNewCString(); - length = subkey.Length(); + length = value.Length(); root = (HKEY) mRootKey; result = RegOpenKeyEx( root, subkeyCString, 0, KEY_ALL_ACCESS, &newkey);