@@ -491,6 +491,26 @@ func TestSharedWorldRegistryRegisterGroundRewardsRejectsBlankOwnerLogin(t *testi
491491 }
492492}
493493
494+ func TestSharedWorldRegistryRegisterGroundRewardsRejectsBlankOwnerName(t *testing.T) {
495+ registry := newSharedWorldRegistry()
496+ owner := peerVisibilityCharacter("BlankNameRewardOwner", 0x010301a1, 0x020401a1, 1200, 2200, 0, 101, 201)
497+ owner.Name = "\t"
498+ ownerID, _ := registry.Join(owner, newPendingServerFrames(), nil)
499+ if ownerID == 0 {
500+ t.Fatal("expected blank-name reward owner join to allocate a shared-world entity id")
501+ }
502+
503+ if registry.RegisterGroundItem(ownerID, "blank-name-reward-owner", owner, 0x07000021, inventory.ItemInstance{Vnum: 3001, Count: 1}) {
504+ t.Fatal("expected blank-name ground-item reward registration to fail closed")
505+ }
506+ if registry.RegisterGroundGold(ownerID, "blank-name-reward-owner", owner, 0x07000022, 250) {
507+ t.Fatal("expected blank-name ground-gold reward registration to fail closed")
508+ }
509+ if registry.GroundItemExists(0x07000021) || registry.GroundItemExists(0x07000022) {
510+ t.Fatal("expected rejected blank-name reward ground entries to stay absent")
511+ }
512+ }
513+
494514func TestSharedWorldRegistryRegisterGroundRewardsRejectsStaleLiveOwnerSnapshotAfterOwnerDeath(t *testing.T) {
495515 registry := newSharedWorldRegistry()
496516 owner := peerVisibilityCharacter("StaleLiveRewardOwner", 0x01030193, 0x02040193, 1200, 2200, 0, 101, 201)
0 commit comments