foute yencodings beter afhandelen
This commit is contained in:
parent
39aae3d4e0
commit
4ceaf63c27
1 changed files with 6 additions and 2 deletions
|
|
@ -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$
|
# $Source$
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
@ -54,8 +54,12 @@ def _ydecode_line(line)
|
||||||
while i < ll
|
while i < ll
|
||||||
if line[i] == 0x3d
|
if line[i] == 0x3d
|
||||||
i += 1
|
i += 1
|
||||||
|
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
|
line[i] -= 64
|
||||||
end
|
end
|
||||||
|
end
|
||||||
ostr << @ymap[line[i]]
|
ostr << @ymap[line[i]]
|
||||||
i += 1
|
i += 1
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue