mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
pop() was not implemented correctly
This commit is contained in:
@@ -150,9 +150,8 @@ public class StringList implements Iterable<String> {
|
||||
if (count == 0) {
|
||||
throw new RuntimeException("Can't call pop() on an empty list");
|
||||
}
|
||||
count--; // back up to the last entry
|
||||
String value = get(count);
|
||||
data[count] = null; // avoid leak
|
||||
String value = get(count-1);
|
||||
data[--count] = null; // avoid leak
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
0235 (3.0a7)
|
||||
0235 (3.0a8)
|
||||
X pop() was not implemented correctly
|
||||
|
||||
|
||||
high priority
|
||||
|
||||
Reference in New Issue
Block a user