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

[GoldSource] MSG_WriteBitString can write incorrect characters #2323

Closed
2010kohtep opened this issue Apr 27, 2019 · 3 comments
Closed

[GoldSource] MSG_WriteBitString can write incorrect characters #2323

2010kohtep opened this issue Apr 27, 2019 · 3 comments
Assignees
Labels

Comments

@2010kohtep
Copy link

@2010kohtep 2010kohtep commented Apr 27, 2019

If you try to write a string with MSG_WriteBitString that contatins characters whose code is >= 0x80 (f.e. Cyrillic), then 0xFF will be written instead of a needed characters. More on this described here: dreamstalker/rehlds/issues/150

image

The image shows the original MSG_WriteBitString function. We can see the type of the variable const char, which is the cause of the problem.

The solution is to use unsigned char *pch instead of char *pch.

@mikela-valve mikela-valve added this to the Next Release milestone Apr 28, 2019
@mikela-valve mikela-valve self-assigned this Apr 28, 2019
@mikela-valve

This comment has been minimized.

Copy link
Collaborator

@mikela-valve mikela-valve commented May 15, 2019

Fixed, will be included in the next beta.

@mikela-valve

This comment has been minimized.

Copy link
Collaborator

@mikela-valve mikela-valve commented May 21, 2019

Fixed in beta 'Exe build: 11:12:36 May 21 2019 (8244)'.

@mikela-valve

This comment has been minimized.

Copy link
Collaborator

@mikela-valve mikela-valve commented Jun 2, 2019

Closing as fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.