[Bug Fix] GLAA fix after database.cpp updates #4277
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Group LeadershipAA was not being sent to clients correctly after the database.cpp updates and changes to use the repo pattern. Issue was traced to saving the leadership aa data to the group_leaders table. The repo was converting to a std::string and was truncating at the first 0x00, creating the issue.
Solution:
Create an encode/decode function within Database to add char('0') to the values, mirroring the builtin behavior of the RoF2 client in various places. Therefore, the the repo treats it correctly. Also, rewrote the save routine to also use the repo and this functionality. There are no db changes required, the existing blob datatype remains unchanged.
Type of change
Bug fix.
Testing
https://1drv.ms/v/s!AupA3qRrvt-1oc42Wt8qUfnKWbuOkw
Clients tested:
The solution was tested with RoF2 and UF client.
Checklist