benilla-re systems structs docs

s_languageWordMask

global · ui

Address
0xb6e5bc · 4 bytes, up to 0xb6e5bf
Type
uint32_t
Meaning
Holds the bucket mask of the language word index, -1 while it is not built
Confidence
verified, proof one
Finding
ui/chatlanguage#choosing-the-substitute

Finding: Choosing the substitute in ui: languages in chat

A word that is not understood is replaced by a LanguageWords word of the same byte length in the same language. The length key is the word's length capped at 18; when the language has no word of that length the key falls by one until one exists, and a word with no match down to length 1 is dropped from the line. The candidates of a key are in LanguageWords row order and the pick is the hash (computed above) modulo their count, so the same word always gives the same substitute.

The derivation is in the doc.