EmulatorPkg/ThunkProtocolList: Fix VS build failure

VS compiler complains converting UINTN to UINT16 causes data lost.
Add typecast to fix the build failure.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Andrdw Fish <afish@apple.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
This commit is contained in:
Ruiyu Ni 2018-08-23 13:01:06 +08:00
parent 983f5abb9a
commit 47c04c382e
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
Emulator Thunk to abstract OS services from pure EFI code Emulator Thunk to abstract OS services from pure EFI code
Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR> Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.<BR>
Copyright (c) 2011, Intel Corporation. All rights reserved.<BR> Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
@ -82,7 +82,7 @@ AddThunkProtocol (
Private->EmuBusDriver = EmuBusDriver; Private->EmuBusDriver = EmuBusDriver;
CopyMem (&Private->Data, ThunkIo, sizeof (EMU_IO_THUNK_PROTOCOL)); CopyMem (&Private->Data, ThunkIo, sizeof (EMU_IO_THUNK_PROTOCOL));
Private->Data.Instance = Instance++; Private->Data.Instance = (UINT16)Instance++;
Private->Data.ConfigString = StartString; Private->Data.ConfigString = StartString;
InsertTailList (&mThunkList, &Private->Link); InsertTailList (&mThunkList, &Private->Link);