UefiCpuPkg/PiSmmCpuDxeSmm: Fix ASSERT for success.
UefiCpuPkg/PiSmmCpuDxeSmm: Fix ASSERT for success.

Index is initialized to MAX_UINT16 as default failure value, which
is what the ASSERT is supposed to test for.  The ASSERT condition
however can never return FALSE for INT16 != int, as due to
Integer Promotion[1], Index is converted to int, which can never
result in -1.

Furthermore, Index is used as a for loop index variable inbetween its
initialization and the ASSERT, so the value is unconditionally
overwritten too.

Fix the ASSERT check to compare Index to its upper boundary, which it
will be equal to if the loop was not broken out of on success.

[1] ISO/IEC 9899:2011, 6.5.9.4

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marvin Haeuser <698b52c00dda40a38da3fa2eb3df3afebf936977@outlook.com>
Reviewed-by: Eric Dong <fa9eeec52367040ac98013bc4b2913db170588f8@intel.com>

MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2