mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-04 20:21:18 +08:00
[RegistryPreview]Fix empty DWORD and QWORD values (#25751)
Adds special handling for DWORD and QWORD Value types with empty values.
This commit is contained in:
parent
471bb3bba2
commit
57f9286023
@ -430,6 +430,21 @@ namespace RegistryPreview
|
|||||||
|
|
||||||
registryValue.Value = value;
|
registryValue.Value = value;
|
||||||
|
|
||||||
|
break;
|
||||||
|
case "REG_DWORD":
|
||||||
|
if (value.Length <= 0)
|
||||||
|
{
|
||||||
|
registryValue.Type = "ERROR";
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
case "REG_QWORD":
|
||||||
|
if (value.Length <= 0)
|
||||||
|
{
|
||||||
|
value = resourceLoader.GetString("InvalidQword");
|
||||||
|
}
|
||||||
|
|
||||||
|
registryValue.Value = value;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
registryValue.Value = value;
|
registryValue.Value = value;
|
||||||
|
@ -138,6 +138,9 @@
|
|||||||
<data name="FilterRegistryName" xml:space="preserve">
|
<data name="FilterRegistryName" xml:space="preserve">
|
||||||
<value>Registry files (*.reg)</value>
|
<value>Registry files (*.reg)</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="InvalidQword" xml:space="preserve">
|
||||||
|
<value>(Invalid QWORD (64-bit) value)</value>
|
||||||
|
</data>
|
||||||
<data name="InvalidRegistryFile" xml:space="preserve">
|
<data name="InvalidRegistryFile" xml:space="preserve">
|
||||||
<value> doesn't appear to be a valid registry file!</value>
|
<value> doesn't appear to be a valid registry file!</value>
|
||||||
</data>
|
</data>
|
||||||
|
Loading…
Reference in New Issue
Block a user