-
-
Notifications
You must be signed in to change notification settings - Fork 464
Closed
Description
Help us help you
- I have checked that my issue doesn't exist yet.
- I have tried my absolute best to reduce the problem-space and have provided the absolute smallest test-case possible.
- I can always reproduce the issue with the provided description below.
Environment
- Operating System version: Windows 10
- Game/AppID (with version if applicable): CS:GO
- Current SourceMod version: 1.10.0.6.6460
- I have updated SourceMod to the latest version and it still happens.
- I have updated SourceMod to the latest snapshot and it still happens.
- I have updated SourceMM to the latest snapshot and it still happens.
Description
Some network string tables inside the engine send raw data from meory, not strings (e. g. the userinfo table as seen here). Sadly, SourceMod uses a bytes-to-string conversion function inside GetStringTableData, so everything after \0 is truncated.
Problem:
| pContext->StringToLocalUTF8(params[3], params[4], userdata, &numBytes); |
(Same goes true for SetStringTableData).
Problematic Code (or Steps to Reproduce)
You can validate by reading any userinfo entry with GetStringTableData and compare the return value (which is the length of string characters read instead of bytes read) with GetStringTableDataLength (which returns the correct size).
Possible solution
Either create an additional function to read raw data or allow to specify a flag to the function.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels