mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-18 01:35:27 +00:00
fix(inventory): inventory group names are cut to 64 characters, as the client
LWOInventoryComponent_Common::msgUpdateInventoryGroup (0x00c955b0) resizes the group name to 64 characters on ADD and MODIFY. The server kept names of any length in the charxml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -60,3 +60,12 @@ TEST_F(InventoryGroupTests, AddingAGroupThatExistsDoesNothing) {
|
||||
EXPECT_EQ(Groups()[0].groupName, "first");
|
||||
EXPECT_EQ(Groups()[0].lots.size(), 1u);
|
||||
}
|
||||
|
||||
TEST_F(InventoryGroupTests, NamesAreCutTo64Characters) {
|
||||
const std::u16string longName(70, u'a');
|
||||
Group("ADD", "user_group1", longName);
|
||||
EXPECT_EQ(Groups()[0].groupName, std::string(64, 'a'));
|
||||
|
||||
Group("MODIFY", "user_group1", std::u16string(65, u'b'));
|
||||
EXPECT_EQ(Groups()[0].groupName, std::string(64, 'b'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user