diff --git a/teavm-classlib/src/main/java/org/teavm/classlib/java/util/logging/TLogger.java b/teavm-classlib/src/main/java/org/teavm/classlib/java/util/logging/TLogger.java index 73e7224a6b..bf33555f27 100644 --- a/teavm-classlib/src/main/java/org/teavm/classlib/java/util/logging/TLogger.java +++ b/teavm-classlib/src/main/java/org/teavm/classlib/java/util/logging/TLogger.java @@ -86,7 +86,7 @@ private TString format(TString message, Object[] params) { index = next; continue; } - int paramIndex = TInteger.parseInt(message.substring(index, next - 1)); + int paramIndex = TInteger.parseInt(message.substring(paramStart, next)); if (paramIndex >= params.length) { sb.append(message.substring(index, next)); index = next;