Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure BitStream comparisons still work correctly #1752

Merged
merged 1 commit into from Oct 24, 2020

Conversation

qaisjp
Copy link
Contributor

@qaisjp qaisjp commented Oct 24, 2020

This fixes the following issue:

Currently we have this

enum class eBitStreamVersion : unsigned short
{
    Unk = 0x06F,
    Latest
};

our bitstream version (Latest) is 0x070

If we add a feature, like so:

enum class eBitStreamVersion : unsigned short
{
    Unk = 0x06F,
    NewThing,
    Latest
};

Latest becomes 0x071. But bitstream checks will compare against NewThing (0x070) which
matches old client/servers whose latest is also 0x070

This fixes the following issue:

Currently we have this

```cpp
enum class eBitStreamVersion : unsigned short
{
    Unk = 0x06F,
    Latest
};
```

our bitstream version (Latest) is 0x070

If we add a feature, like so:

```
enum class eBitStreamVersion : unsigned short
{
    Unk = 0x06F,
    NewThing,
    Latest
};
```

Latest becomes 0x071. But bitstream checks will compare against NewThing (0x070) which
matches old client/servers whose latest is also 0x070
@qaisjp qaisjp added the bug Something isn't working label Oct 24, 2020
@StrixG StrixG added this to the 1.6 milestone Oct 24, 2020
@qaisjp qaisjp merged commit 31812ff into multitheftauto:master Oct 24, 2020
@qaisjp qaisjp deleted the fix-bitstream branch October 24, 2020 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants