added checks to ensure a mode it properly set and supported by the format

git-svn-id: file:///home/svn/framework3/trunk@12860 4d416f70-5f16-0410-b530-b9f4589650da
unstable
David Rude 2011-06-05 14:32:20 +00:00
parent fd04578a90
commit de6fca43d7
1 changed files with 6 additions and 1 deletions

View File

@ -126,7 +126,7 @@ rescue OptionParser::InvalidOption
exit(1)
end
if not mode
if not mode or mode.nil?
puts "A mode must be selected"
exit(1)
end
@ -198,6 +198,11 @@ files.each do |file|
pe.image_base = param['imagebase'];
end
if not worker
$stderr.puts("A mode could not be set for this file.")
next
end
o = worker.new(pe)
o.scan(param)