1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-03 00:53:41 +00:00

Updated, so if the named key is null, the default value will be set instead.

This commit is contained in:
Bryan Roe
2019-10-22 13:41:13 -07:00
parent 340a16cfda
commit 2aceb3d706
2 changed files with 2 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@@ -181,7 +181,7 @@ function windows_registry()
break;
}
if (this._AdvApi.RegSetValueExW(h.Deref(), this._marshal.CreateVariable(key, { wide: true }), 0, dataType, data, data._size).Val != 0)
if (this._AdvApi.RegSetValueExW(h.Deref(), key?this._marshal.CreateVariable(key, { wide: true }):0, 0, dataType, data, data._size).Val != 0)
{
this._AdvApi.RegCloseKey(h.Deref());
throw ('Error writing reg key: ' + key);