mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
[PSDK]
- Fix (nt)intsafe.h signed to unsigned conversions. Based on a patch by Timo. CORE-7578 #resolve svn path=/trunk/; revision=60993
This commit is contained in:
parent
0ecfcc1bce
commit
9f96a991c1
1 changed files with 2 additions and 1 deletions
|
@ -343,7 +343,8 @@ INTSAFE_NAME(_Name)( \
|
|||
_In_ _TypeFrom Input, \
|
||||
_Out_ _Deref_out_range_(==, Input) _TypeTo *pOutput) \
|
||||
{ \
|
||||
if ((Input >= 0) && ((_TypeTo)Input <= _TypeTo ## _MAX)) \
|
||||
if ((Input >= 0) && \
|
||||
((sizeof(_TypeFrom) <= sizeof(_TypeTo)) || (Input <= (_TypeFrom)_TypeTo ## _MAX))) \
|
||||
{ \
|
||||
*pOutput = (_TypeTo)Input; \
|
||||
return INTSAFE_SUCCESS; \
|
||||
|
|
Loading…
Reference in a new issue