JavaScript: Fix CodeQL alert in extractor

This doesn't make a difference in practice because we only run the method on arrays of even length, but we might as well fix it.
This commit is contained in:
Max Schaefer
2024-06-19 17:13:01 +01:00
committed by GitHub
parent 6dbdc9e17f
commit 2be171746b

View File

@@ -115,7 +115,7 @@ public class Identifiers {
// rare.
private static boolean isInAstralSet(int code, int[] set) {
int pos = 0x10000;
for (int i = 0; i < set.length; i += 2) {
for (int i = 0; i < set.length - 1; i += 2) {
pos += set[i];
if (pos > code) return false;
pos += set[i + 1];