- Fixed RtlNtStatusToDosErrorNoTeb problems caused by mixing signed and unsigned integers.

svn path=/trunk/; revision=8445
This commit is contained in:
Filip Navara 2004-02-28 15:12:49 +00:00
parent 9b3df405d1
commit 44cb45b570
2 changed files with 6 additions and 6 deletions

View file

@ -1,4 +1,4 @@
/* $Id: error.c,v 1.14 2003/08/22 13:45:34 ea Exp $ /* $Id: error.c,v 1.15 2004/02/28 15:12:49 navaraf Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -872,12 +872,12 @@ RtlNtStatusToDosErrorNoTeb(NTSTATUS Status)
while (Table->Start) while (Table->Start)
{ {
if (Status < Table->Start) if ((ULONG)Status < Table->Start)
break; break;
if (Status < Table->End) if ((ULONG)Status < Table->End)
{ {
DWORD ret = Table->Table[Status - Table->Start]; DWORD ret = Table->Table[(ULONG)Status - Table->Start];
if (!ret) if (!ret)
ret = Status; /* 0 means 1:1 mapping */ ret = Status; /* 0 means 1:1 mapping */
else if (ret == ERROR_MR_MID_NOT_FOUND) else if (ret == ERROR_MR_MID_NOT_FOUND)

View file

@ -1,4 +1,4 @@
/* $Id: error.c,v 1.10 2004/02/27 05:50:56 navaraf Exp $ /* $Id: error.c,v 1.11 2004/02/28 15:12:49 navaraf Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -886,7 +886,7 @@ RtlNtStatusToDosErrorNoTeb(IN NTSTATUS Status)
if ((ULONG)Status < Table->End) if ((ULONG)Status < Table->End)
{ {
DWORD ret = Table->Table[Status - Table->Start]; DWORD ret = Table->Table[(ULONG)Status - Table->Start];
if (!ret) if (!ret)
ret = Status; /* 0 means 1:1 mapping */ ret = Status; /* 0 means 1:1 mapping */
else if (ret == ERROR_MR_MID_NOT_FOUND) else if (ret == ERROR_MR_MID_NOT_FOUND)