api: fix trailing number detection in RemoveNumberedSuffix()
Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
5925f914e4
commit
c8711464bb
@ -336,7 +336,7 @@ static void
|
||||
RemoveNumberedSuffix(_In_z_ const WCHAR *Name, _Out_ WCHAR *Removed)
|
||||
{
|
||||
size_t Len = wcslen(Name);
|
||||
if (Len && Name[Len - 1] < L'0' || Name[Len - 1] > L'9')
|
||||
if (Len && (Name[Len - 1] < L'0' || Name[Len - 1] > L'9'))
|
||||
{
|
||||
wmemcpy(Removed, Name, Len + 1);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user