From 8a58dd8806675abe1eb680c2b26ceecc6c7f7b0b Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 19 Aug 2006 22:21:42 +0000 Subject: [PATCH] this is a bit more standards compliant --- amxmodx/format.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/amxmodx/format.cpp b/amxmodx/format.cpp index ac1cccc6..b2e788db 100644 --- a/amxmodx/format.cpp +++ b/amxmodx/format.cpp @@ -282,8 +282,7 @@ void AddInt(U **buf_p, size_t &maxlen, int val, int width, int flags) if (val < 0) { /* we want the unsigned version */ - val--; - unsignedVal = ~val; + unsignedVal = abs(val); } else { unsignedVal = val; }