dcparser: fix Python 3 regression unpacking uint types

Backport of d1d0dab990 (#1380)

Co-authored-by: Nat <56046513+NathaanTFM@users.noreply.github.com>
This commit is contained in:
rdb 2022-10-22 10:31:26 +02:00
parent 9efdf9919c
commit 00de2771fc
1 changed files with 1 additions and 1 deletions

View File

@ -847,7 +847,7 @@ unpack_object() {
{
unsigned int value = unpack_uint();
#if PY_MAJOR_VERSION >= 3
object = PyLong_FromLong(value);
object = PyLong_FromUnsignedLong(value);
#else
if (value & 0x80000000) {
object = PyLong_FromUnsignedLong(value);