Skip to content
Browse files

fix some silly input/output translation bugs with msfencode

git-svn-id: file:///home/svn/framework3/trunk@11326 4d416f70-5f16-0410-b530-b9f4589650da
  • Loading branch information...
1 parent d12be5b commit ebd2573738aa1391d9cf7736f4175def02c1291c @jduck jduck committed Dec 14, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 msfencode
View
3 msfencode
@@ -132,7 +132,7 @@ $args.parse(ARGV) { |opt, idx, val|
case opt
when "-i"
begin
- input = File.new(val)
+ input = File.open(val, 'rb')
rescue
$stderr.puts(OutError + "Failed to open file #{val}: #{$!}")
exit
@@ -225,6 +225,7 @@ case cmd
$stderr.puts(OutError + "Invalid encoder specified.")
end
when "encode"
+ input.binmode # ensure its in binary mode
buf = input.read
encoders.each { |enc|

0 comments on commit ebd2573

Please sign in to comment.
Something went wrong with that request. Please try again.