-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
bugAn issue describing unexpected behavior of codeAn issue describing unexpected behavior of codegood first issueIssues that are easy to get started withIssues that are easy to get started withpriority: lowIssues with this label won’t have the immediate focusIssues with this label won’t have the immediate focus
Description
By submitting this bug issue, you agree to the following.
- This is a bug in the software that resides in this repository, and not a support matter (use https://otland.net/forums/support.16/ for support)
- This issue is reproducible without changes to the C++ code in this repository
- This bug has not been resolved in master branch
- There is no existing issue for this bug already
Does this bug crash tfs?
no
Server Version
1.7 (Master)
Operation System
all (listed below)
OS Description
No response
Bug description
Adding data to network message always increase it size even if it's not required
Possible Pull Requests which are to blame
N/A
Steps to reproduce
put this code to lua script and execute
local msg = NetworkMessage()
msg:addByte(1)
msg:addByte(2)
msg:addByte(0)
msg:addByte(4)
print(msg:len()) -- will return 4
msg:seek(1) -- set write position
msg:addByte(2) -- already used field
print(msg:len()) -- will return 5@edit updated returned len() values to valid ones
Actual Behavior
Message size increases when not required
Expected Behavior
Message size increases only when required
Backtrace
N/AReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugAn issue describing unexpected behavior of codeAn issue describing unexpected behavior of codegood first issueIssues that are easy to get started withIssues that are easy to get started withpriority: lowIssues with this label won’t have the immediate focusIssues with this label won’t have the immediate focus
Type
Projects
Status
Done