From 553b234252c200214ea17b7271297dab42014e58 Mon Sep 17 00:00:00 2001 From: JoePfeiffer Date: Tue, 16 Jan 2024 07:41:48 -0700 Subject: [PATCH] Don't pass extra value (cd) to String.format --- .../net/sf/openrocket/gui/dialogs/ComponentAnalysisDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swing/src/net/sf/openrocket/gui/dialogs/ComponentAnalysisDialog.java b/swing/src/net/sf/openrocket/gui/dialogs/ComponentAnalysisDialog.java index 320c4b43a..725f3e82b 100644 --- a/swing/src/net/sf/openrocket/gui/dialogs/ComponentAnalysisDialog.java +++ b/swing/src/net/sf/openrocket/gui/dialogs/ComponentAnalysisDialog.java @@ -770,7 +770,7 @@ public class ComponentAnalysisDialog extends JDialog implements StateChangeListe DecimalFormat df = new DecimalFormat("0." + "#".repeat(Math.max(0, decimalPlaces))); String cdFormatted = df.format(cd); - return String.format(cdFormatted + " (%.0f%%)", cd, 100 * cd / totalCD); + return String.format(cdFormatted + " (%.0f%%)", 100 * cd / totalCD); } }