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

fix string_view issue in ProtocolGame::parseRuleViolationReport #4853

Merged
merged 1 commit into from
Nov 24, 2024

Conversation

ArturKnopik
Copy link
Contributor

Pull Request Prelude

Changes Proposed

Issues addressed:

Fix temporary string to string_view assignment in ProtocolGame::parseRuleViolationReport

@@ -1419,7 +1419,7 @@ void ProtocolGame::parseRuleViolationReport(NetworkMessage& msg)
uint8_t reportReason = msg.getByte();
auto targetName = msg.getString();
auto comment = msg.getString();
std::string_view translation;
std::string translation;
if (reportType == REPORT_TYPE_NAME) {
translation = msg.getString();
Copy link
Contributor Author

@ArturKnopik ArturKnopik Nov 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

msg.getString() returns temporary string object.

@EPuncker EPuncker merged commit bc60e5e into otland:master Nov 24, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants