Skip to content

Commit 55455e6

Browse files
committed
SYBAUUUUUUUUUUUUUUUU
1 parent ef49b07 commit 55455e6

2 files changed

Lines changed: 5 additions & 11 deletions

File tree

‎internal/courtroom/reactionwire.go‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,11 @@ func MakeReactionRef(charName, cleanText string) uint32 {
9191
for i := 0; i < len(charName); i++ {
9292
h = (h ^ uint32(charName[i])) * fnvPrime32
9393
}
94-
h = (h ^ 0x00) * fnvPrime32 // field separator
94+
// Field separator: feed one 0x00 byte through the FNV-1a step so "ab"+"c" can't hash the
95+
// same as "a"+"bc". FNV-1a of a 0x00 byte is (h ^ 0) * prime = h * prime — the XOR is
96+
// elided (it's a no-op; staticcheck SA4016 flags `h ^ 0x00`), but this IS that separator
97+
// step, so the ref value is unchanged and stays cross-client stable.
98+
h *= fnvPrime32
9599
for i := 0; i < len(cleanText); i++ {
96100
h = (h ^ uint32(cleanText[i])) * fnvPrime32
97101
}

‎internal/ui/reactions.go‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -161,16 +161,6 @@ func (a *App) warmReactBadges() {
161161
}
162162
}
163163

164-
// purgeReactBadges frees the cached badge textures. The reaction badges live for the
165-
// emoji face's lifetime (install-once, never swapped at runtime), so this isn't wired into
166-
// the per-session teardown; it exists for tests and a future face swap.
167-
func (a *App) purgeReactBadges() {
168-
for k, b := range a.reactBadges {
169-
b.Destroy()
170-
delete(a.reactBadges, k)
171-
}
172-
}
173-
174164
// onIncomingReaction handles a decoded reaction frame: float it only if its ref matches a
175165
// recent message we've actually seen (a stray / late-join ref matches nothing — benign).
176166
// Gated by the HideReactions viewer opt-out.

0 commit comments

Comments
 (0)