bug fix for recent enhancements

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@510 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
sjfink 2006-12-13 20:54:16 +00:00
parent 7ecacb4662
commit 73abdfbd9d
1 changed files with 3 additions and 3 deletions

View File

@ -31,13 +31,13 @@ public class CommandLine {
*/
public static Properties parse(String[] args) throws WalaException {
Properties result = new Properties();
for (int i = 0; i < args.length - 1; i++) {
for (int i = 0; i < args.length; i++) {
String key = parseForKey(args[i]);
if (key != null) {
if (args[i].contains("=")) {
result.put(key, args[i].substring(args[i].indexOf('=')+1));
result.put(key, args[i].substring(args[i].indexOf('=') + 1));
} else {
if (args[i + 1].charAt(0) == '-') {
if ((i + 1) >= args.length || args[i + 1].charAt(0) == '-') {
throw new WalaException("Malformed command-line. Must be of form -key=value or -key value");
}
result.put(key, args[i + 1]);