diff options
| author | Jules Aguillon | 2025-03-28 00:26:48 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2025-03-28 00:27:44 +0100 |
| commit | 58dabfaa07982b4fbc697b8a4a0eb6e64c5007bc (patch) | |
| tree | db519237bda0a8453969417db625e23115f73a30 /srcs/juloo.keyboard2/Emoji.java | |
| parent | 3d7925340ba3176922ff921bcc1c176c47e700ee (diff) | |
| download | unexpected-keyboard-58dabfaa07982b4fbc697b8a4a0eb6e64c5007bc.tar.gz unexpected-keyboard-58dabfaa07982b4fbc697b8a4a0eb6e64c5007bc.zip | |
Fix emoji flag group missing
Off by one error when parsing the emoji groups.
Diffstat (limited to 'srcs/juloo.keyboard2/Emoji.java')
| -rw-r--r-- | srcs/juloo.keyboard2/Emoji.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/srcs/juloo.keyboard2/Emoji.java b/srcs/juloo.keyboard2/Emoji.java index d0842bc..a0377cb 100644 --- a/srcs/juloo.keyboard2/Emoji.java +++ b/srcs/juloo.keyboard2/Emoji.java @@ -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); } |
