diff options
author | Simon Rozman <simon@rozman.si> | 2020-07-28 11:46:30 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-10-30 16:50:59 +0100 |
commit | c8711464bb86c5339cee37b41ff193f165722e73 (patch) | |
tree | 292932493c525e8861e75e276bd3c41a8fbe28a5 /api | |
parent | api: add support for WoW64 (diff) | |
download | wintun-c8711464bb86c5339cee37b41ff193f165722e73.tar.xz wintun-c8711464bb86c5339cee37b41ff193f165722e73.zip |
api: fix trailing number detection in RemoveNumberedSuffix()
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'api')
-rw-r--r-- | api/devmgmt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/api/devmgmt.c b/api/devmgmt.c index 6454979..0022d56 100644 --- a/api/devmgmt.c +++ b/api/devmgmt.c @@ -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; |