Skip to content

Commit 98c217a

Browse files
authored
Fix for #78 (#80)
Fixes the issue #78
1 parent 66a2e65 commit 98c217a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/CosReader.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ get_pdfcontentops
33

44
import Base: peek
55

6+
_error(msg, io) = error(msg*" at $(position(io)) found $(_peekb(io))")
7+
68
#This function is for testing only
79
function parse_data(filename)
810
ps=util_open(filename,"r")
@@ -239,11 +241,11 @@ end
239241
function ensure_line_feed_eol(ps::IO)
240242
c = advance!(ps)
241243
if (c == RETURN)
242-
skipv(ps,LINE_FEED)
244+
skipv(ps,LINE_FEED)
243245
elseif (c == LINE_FEED)
244-
return c
246+
return c
245247
else
246-
_error(E_UNEXPECTED_CHAR)
248+
_error(E_UNEXPECTED_CHAR, ps)
247249
end
248250
end
249251

0 commit comments

Comments
 (0)