Skip to content

Commit 0a1e69f

Browse files
committed
Merge pull request #121 from b2renger/master
Fix Table.insertRow
2 parents af7e141 + 7abbb04 commit 0a1e69f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

core/src/processing/data/Table.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -1855,35 +1855,35 @@ public void insertRow(int insert, Object[] columnData) {
18551855
case INT: {
18561856
int[] intTemp = new int[rowCount+1];
18571857
System.arraycopy(columns[col], 0, intTemp, 0, insert);
1858-
System.arraycopy(columns[col], insert, intTemp, insert+1, (rowCount - insert) + 1);
1858+
System.arraycopy(columns[col], insert, intTemp, insert+1, rowCount - insert);
18591859
columns[col] = intTemp;
18601860
break;
18611861
}
18621862
case LONG: {
18631863
long[] longTemp = new long[rowCount+1];
18641864
System.arraycopy(columns[col], 0, longTemp, 0, insert);
1865-
System.arraycopy(columns[col], insert, longTemp, insert+1, (rowCount - insert) + 1);
1865+
System.arraycopy(columns[col], insert, longTemp, insert+1, rowCount - insert);
18661866
columns[col] = longTemp;
18671867
break;
18681868
}
18691869
case FLOAT: {
18701870
float[] floatTemp = new float[rowCount+1];
18711871
System.arraycopy(columns[col], 0, floatTemp, 0, insert);
1872-
System.arraycopy(columns[col], insert, floatTemp, insert+1, (rowCount - insert) + 1);
1872+
System.arraycopy(columns[col], insert, floatTemp, insert+1, rowCount - insert);
18731873
columns[col] = floatTemp;
18741874
break;
18751875
}
18761876
case DOUBLE: {
18771877
double[] doubleTemp = new double[rowCount+1];
18781878
System.arraycopy(columns[col], 0, doubleTemp, 0, insert);
1879-
System.arraycopy(columns[col], insert, doubleTemp, insert+1, (rowCount - insert) + 1);
1879+
System.arraycopy(columns[col], insert, doubleTemp, insert+1, rowCount - insert);
18801880
columns[col] = doubleTemp;
18811881
break;
18821882
}
18831883
case STRING: {
18841884
String[] stringTemp = new String[rowCount+1];
18851885
System.arraycopy(columns[col], 0, stringTemp, 0, insert);
1886-
System.arraycopy(columns[col], insert, stringTemp, insert+1, (rowCount - insert) + 1);
1886+
System.arraycopy(columns[col], insert, stringTemp, insert+1, rowCount - insert);
18871887
columns[col] = stringTemp;
18881888
break;
18891889
}

0 commit comments

Comments
 (0)