diff --git a/trunk/ripnews/encode/yenc.rb b/trunk/ripnews/encode/yenc.rb index 5ae15ea..8b4af26 100644 --- a/trunk/ripnews/encode/yenc.rb +++ b/trunk/ripnews/encode/yenc.rb @@ -1,4 +1,4 @@ -# $Dwarf: yenc.rb,v 1.9 2003/07/20 20:32:01 ward Exp $ +# $Dwarf: yenc.rb,v 1.10 2004/06/16 08:14:50 ward Exp $ # $Source$ # @@ -54,7 +54,11 @@ def _ydecode_line(line) while i < ll if line[i] == 0x3d i += 1 - line[i] -= 64 + if i == ll + raise PermError, "Escape char found as last char on line. This is not allowed by the yEnc standard" + else + line[i] -= 64 + end end ostr << @ymap[line[i]] i += 1