Skip to content

Commit

Permalink
prevent array index out of bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Jan 17, 2020
1 parent fe6f685 commit 550a104
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -781,7 +781,8 @@ protected String dmlValuesToString(Object[] dmlValues, int[] types) {
LogSqlBuilder logSqlBuilder = new LogSqlBuilder();

for (int i = 0; i < dmlValues.length; i++) {
buff.append(logSqlBuilder.formatValue(dmlValues[i], types[i]));
int type = i < types.length ? types[i] : -9999;
buff.append(logSqlBuilder.formatValue(dmlValues[i], type));
if (i < dmlValues.length-1) {
buff.append(", ");
}
Expand Down

0 comments on commit 550a104

Please sign in to comment.