Skip to content

Commit

Permalink
check for args length
Browse files Browse the repository at this point in the history
  • Loading branch information
jamorton committed Apr 7, 2012
1 parent b73d4f4 commit e2089a9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@ fn compile_file(filename: str)
}

fn main(args: [str]) {
compile_file(args[1]);
if (arg.len() != 2) {
io::println("Usage:");
io::println(" ./asm [asm file]");
ret;
}

compile_file(args[1]);
}

0 comments on commit e2089a9

Please sign in to comment.