Fix conversion from 'UINTN' to 'UINT8' warnings
* MSVC generates two of the following in rtstr.c: warning C4244: 'function': conversion from 'UINTN' to 'UINT8', possible loss of data
This commit is contained in:
parent
fc5af9e47f
commit
85f1c797f6
@ -71,7 +71,7 @@ RtStrnCpy (
|
||||
{
|
||||
UINTN Size = RtStrnLen(Src, Len);
|
||||
if (Size != Len)
|
||||
RtSetMem(Dest + Len, '\0', (Len - Size) * sizeof(CHAR16));
|
||||
RtSetMem(Dest + Len, '\0', (UINT8)((Len - Size) * sizeof(CHAR16)));
|
||||
RtCopyMem(Dest, Src, Size * sizeof(CHAR16));
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ RtStpnCpy (
|
||||
{
|
||||
UINTN Size = RtStrnLen(Src, Len);
|
||||
if (Size != Len)
|
||||
RtSetMem(Dest + Len, '\0', (Len - Size) * sizeof(CHAR16));
|
||||
RtSetMem(Dest + Len, '\0', (UINT8)((Len - Size) * sizeof(CHAR16)));
|
||||
RtCopyMem(Dest, Src, Size * sizeof(CHAR16));
|
||||
return Dest + Size;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user