mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
index out of bounds check
This commit is contained in:
@@ -95,8 +95,8 @@ public class OffsetMatcher {
|
||||
+ offsetMatch.get(i).pdeOffset);
|
||||
}
|
||||
int pdeOff = offsetMatch.get(++i).pdeOffset;
|
||||
while (offsetMatch.get(--i).pdeOffset == pdeOff)
|
||||
;
|
||||
if(i > 0)
|
||||
while (offsetMatch.get(--i).pdeOffset == pdeOff);
|
||||
int j = i + 1;
|
||||
if (j > -1 && j < offsetMatch.size())
|
||||
return offsetMatch.get(j).pdeOffset;
|
||||
@@ -118,8 +118,8 @@ public class OffsetMatcher {
|
||||
// + offsetMatch.get(i).pdeOffset);
|
||||
}
|
||||
int javaOff = offsetMatch.get(++i).javaOffset;
|
||||
while (offsetMatch.get(--i).javaOffset == javaOff)
|
||||
;
|
||||
if(i > 0)
|
||||
while (offsetMatch.get(--i).javaOffset == javaOff);
|
||||
int j = i + 1;
|
||||
if (j > -1 && j < offsetMatch.size())
|
||||
return offsetMatch.get(j).javaOffset;
|
||||
|
||||
Reference in New Issue
Block a user