Fix emoji flag group missing
Some checks failed
Make Apk CI / Build-Apk (push) Has been cancelled
Check translations / check-translations (push) Has been cancelled
Check layouts / check_layout.output (push) Has been cancelled
Check layouts / Generated files (push) Has been cancelled

Off by one error when parsing the emoji groups.
This commit is contained in:
Jules Aguillon 2025-03-28 00:26:48 +01:00
parent 3d7925340b
commit 58dabfaa07

View File

@ -51,8 +51,14 @@ public class Emoji
if ((line = reader.readLine()) != null)
{
String[] tokens = line.split(" ");
for (int i = 0; i < tokens.length-1; i++)
_groups.add(_all.subList(Integer.parseInt(tokens[i]), Integer.parseInt(tokens[i+1])));
int last = 0;
for (int i = 1; i < tokens.length; i++)
{
int next = Integer.parseInt(tokens[i]);
_groups.add(_all.subList(last, next));
last = next;
}
_groups.add(_all.subList(last, _all.size()));
}
}
catch (IOException e) { Logs.exn("Emoji.init() failed", e); }