From 4a943e46084b1ef7a62506874bbddf8526fbfba6 Mon Sep 17 00:00:00 2001 From: "Allan C. M. Lira" Date: Fri, 7 Aug 2020 11:24:11 -0300 Subject: [PATCH] simulator: correctly skips the key arg #94 (#95) The */r* argument was the argument that referenced TotalCross's serial license number. To keep backwards compatibility, we just skipped what it would do, but we didn't do it the right way. This patch adjust the argument iterator, it has no effect when being incremented within the `if`. --- TotalCrossSDK/src/main/java/totalcross/Launcher.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TotalCrossSDK/src/main/java/totalcross/Launcher.java b/TotalCrossSDK/src/main/java/totalcross/Launcher.java index d0f142c35e..3c7b942110 100644 --- a/TotalCrossSDK/src/main/java/totalcross/Launcher.java +++ b/TotalCrossSDK/src/main/java/totalcross/Launcher.java @@ -513,8 +513,8 @@ protected void parseArguments(String clazz, String... args) { } } System.out.println("Screen is " + toWidth + "x" + toHeight + "x" + toBpp); - } else if (args[i++].equalsIgnoreCase("/r")) { - // Ignore next argument + } else if (args[i].equalsIgnoreCase("/r")) { + ++i; } else if (args[i].equalsIgnoreCase("/pos")) /* x,y */ { String[] scr = tokenizeString(args[++i].toLowerCase(), ',');