diff --git a/lldb/test/API/tools/lldb-server/TestGdbRemotePlatformFile.py b/lldb/test/API/tools/lldb-server/TestGdbRemotePlatformFile.py --- a/lldb/test/API/tools/lldb-server/TestGdbRemotePlatformFile.py +++ b/lldb/test/API/tools/lldb-server/TestGdbRemotePlatformFile.py @@ -32,11 +32,11 @@ def uint32_or_zero(x): - return x if x < 2**32 else 0 + return x if x < 2**32 and x >= 0 else 0 def uint32_or_max(x): - return x if x < 2**32 else 2**32 - 1 + return x if x < 2**32 and x >= 0 else 2**32 - 1 def uint32_trunc(x):