diff --git a/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c b/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c index 9c1a248757f..acc83a41ee6 100644 --- a/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c +++ b/reactos/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c @@ -12,7 +12,7 @@ /* INCLUDES *******************************************************************/ #include - +#include #include #define NDEBUG @@ -694,17 +694,8 @@ GetSelectionBeginEnd(PCOORD Begin, PCOORD End, /* Exchange Begin / End if Begin > End lexicographically */ if (Begin->Y > End->Y || (Begin->Y == End->Y && Begin->X > End->X)) { - SHORT tmp; - - // End->X = InterlockedExchange16(&Begin->X, End->X); - tmp = Begin->X; - Begin->X = End->X; - End->X = tmp; - - // End->Y = InterlockedExchange16(&Begin->Y, End->Y); - tmp = Begin->Y; - Begin->Y = End->Y; - End->Y = tmp; + End->X = _InterlockedExchange16(&Begin->X, End->X); + End->Y = _InterlockedExchange16(&Begin->Y, End->Y); } }