Skip to content

bf_read::ReadSignedVarInt64 Incorrect intermediate type #322

Description

@SizzlingCalamari

https://github.com/ValveSoftware/source-sdk-2013/blob/master/src/tier1/bitbuf.cpp#L1067

In bf_read::ReadSignedVarInt64, the encoded value is read into a uint32, which should be a uint64. This looks like a copy paste bug.

Current:

int64 bf_read::ReadSignedVarInt64()
{
    uint32 value = ReadVarInt64();
    return bitbuf::ZigZagDecode64( value );
}

Fixed:

int64 bf_read::ReadSignedVarInt64()
{
    uint64 value = ReadVarInt64();
    return bitbuf::ZigZagDecode64( value );
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions