[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:
Randy 2023-05-02 05:05:50 -07:00 committed by GitHub
parent 471bb3bba2
commit 57f9286023
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

View File

@ -430,6 +430,21 @@ namespace RegistryPreview
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;
default:
registryValue.Value = value;

View File

@ -138,6 +138,9 @@
<data name="FilterRegistryName" xml:space="preserve">
<value>Registry files (*.reg)</value>
</data>
<data name="InvalidQword" xml:space="preserve">
<value>(Invalid QWORD (64-bit) value)</value>
</data>
<data name="InvalidRegistryFile" xml:space="preserve">
<value> doesn't appear to be a valid registry file!</value>
</data>