Browse Source

Bug fix: do not crash on empty switch, "prism -" (found by Marcin Copik).

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@10301 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 11 years ago
parent
commit
49674cb0a9
  1. 3
      prism/src/prism/PrismCL.java

3
prism/src/prism/PrismCL.java

@ -931,6 +931,9 @@ public class PrismCL implements PrismModelListener
// Remove "-"
sw = args[i].substring(1);
if (sw.length() == 0) {
errorAndExit("Invalid empty switch");
}
// Remove optional second "-" (i.e. we allow switches of the form --sw too)
if (sw.charAt(0) == '-')
sw = sw.substring(1);

Loading…
Cancel
Save