зеркало из https://github.com/mozilla/gecko-dev.git
fixes bug 301521 "nsWindowsRegKey::WriteStringValue is broken" r=jshin a=bsmedberg
This commit is contained in:
Родитель
68373c1777
Коммит
c2ff4e354b
|
@ -576,13 +576,13 @@ nsWindowsRegKey::WriteStringValue(const nsAString &name, const nsAString &value)
|
|||
|
||||
rv = RegSetValueExW(mKey, PromiseFlatString(name).get(), 0, REG_SZ,
|
||||
(const BYTE *) flatValue.get(),
|
||||
flatValue.Length() + sizeof(PRUnichar));
|
||||
(flatValue.Length() + 1) * sizeof(PRUnichar));
|
||||
} else {
|
||||
PromiseNativeString nativeValue(value);
|
||||
|
||||
rv = RegSetValueExA(mKey, PromiseNativeString(name).get(), 0, REG_SZ,
|
||||
(const BYTE *) nativeValue.get(),
|
||||
nativeValue.Length() + sizeof(char));
|
||||
(nativeValue.Length() + 1) * sizeof(char));
|
||||
}
|
||||
|
||||
return (rv == ERROR_SUCCESS) ? NS_OK : NS_ERROR_FAILURE;
|
||||
|
|
Загрузка…
Ссылка в новой задаче