From 4ceaf63c27f2568b76d4b70b50c7c6ad305498c5 Mon Sep 17 00:00:00 2001 From: Ward Wouts Date: Mon, 18 Oct 2004 08:13:47 +0000 Subject: [PATCH] foute yencodings beter afhandelen --- trunk/ripnews/encode/yenc.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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