[ros-dev] [ros-diffs] [hbelusca] 74618: [USETUP]: Move all the code that retrieves the version resources from PE executable, out of osdetect.c, and place it in its own module inside the setuplib. Remove also some commen...
Thomas Faber
thomas.faber at reactos.org
Mon May 22 08:01:24 UTC 2017
On 2017-05-22 01:41, hbelusca at svn.reactos.org wrote:
> +static PCVS_VERSION_INFO_STRUCT32
> +VersionInfo32_FindChild(
> + IN PCVS_VERSION_INFO_STRUCT32 info,
> + IN PCWSTR szKey,
> + IN UINT cbKey)
> +{
> + PCVS_VERSION_INFO_STRUCT32 child = VersionInfo32_Children(info);
> +
> + while ((ULONG_PTR)child < (ULONG_PTR)info + info->wLength)
> + {
> + if (!_wcsnicmp(child->szKey, szKey, cbKey) && !child->szKey[cbKey])
You're using cbKey in two places that need a character count here.
> + return child;
> +
> + if (child->wLength == 0) return NULL;
> + child = VersionInfo32_Next(child);
> + }
> +
> + return NULL;
> +}
More information about the Ros-dev
mailing list