mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix AIOOB
This commit is contained in:
@@ -66,7 +66,7 @@ public class RainbowHighlighter {
|
||||
if (!registryColors.isEmpty()) {
|
||||
final List<Color> colors = registryColors.stream().map((s -> ColorUtil.fromHex(s.trim()))).collect(Collectors.toList());
|
||||
if (!colors.isEmpty()) {
|
||||
return colors.get(hash % colors.size());
|
||||
return colors.get(Math.abs(hash) % colors.size());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user