mirror of
https://github.com/github/codeql.git
synced 2026-04-24 08:15:14 +02:00
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:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user