Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix position/2 behavior to accept bof|cur|eof

  • Loading branch information...
commit d5087abb93f71e3919d6776d4ec50caf8190494b 1 parent 3b9e7a9
@stolen stolen authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  src/emmap.erl
View
3  src/emmap.erl
@@ -101,6 +101,9 @@ pwrite_nif(_,_,_) ->
position(#file_descriptor{ module=?MODULE, data=Mem}, At)
when is_integer(At) ->
position_nif(Mem, bof, At);
+position(#file_descriptor{ module=?MODULE, data=Mem}, From)
+ when From == 'bof'; From == 'cur'; From == 'eof' ->
+ position_nif(Mem, From, 0);
position(#file_descriptor{ module=?MODULE, data=Mem}, {From, Off})
when From == 'bof'; From == 'cur'; From == 'eof' ->
position_nif(Mem, From, Off).
Please sign in to comment.
Something went wrong with that request. Please try again.