[MMIXER] Fix overzealous asserts. CORE-16611

MAXPNAMELEN is the size of the array, so if wcslen returns MAXPNAMELEN-1,
the null terminator fits and everything is okay.
This commit is contained in:
Thomas Faber 2020-02-01 12:40:38 +01:00
parent 355700f45a
commit 2bbc94c6ac
No known key found for this signature in database
GPG key ID: 076E7C3D44720826
2 changed files with 2 additions and 2 deletions

View file

@ -72,7 +72,7 @@ MMixerAddMidiPin(
MidiInfo->PinId = PinId;
/* sanity check */
ASSERT(!DeviceName || (wcslen(DeviceName) + 1 < MAXPNAMELEN));
ASSERT(!DeviceName || (wcslen(DeviceName) < MAXPNAMELEN));
/* copy device name */
if (bInput && DeviceName)

View file

@ -357,7 +357,7 @@ MMixerInitializeWaveInfo(
WaveInfo->PinId = Pins[0];
/* sanity check */
ASSERT(wcslen(DeviceName) + 1 < MAXPNAMELEN);
ASSERT(wcslen(DeviceName) < MAXPNAMELEN);
/* copy device name */
if (bWaveIn)