File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -842,12 +842,12 @@ struct
842842 Lwt. return (Bytes. unsafe_to_string buf)
843843
844844 let read_value ic =
845- let header = Bytes. create 20 in
846- unsafe_read_into_exactly ic header 0 20 >> = fun () ->
845+ let header = Bytes. create Marshal. header_size in
846+ unsafe_read_into_exactly ic header 0 Marshal. header_size >> = fun () ->
847847 let bsize = Marshal. data_size header 0 in
848- let buffer = Bytes. create (20 + bsize) in
849- Bytes. unsafe_blit header 0 buffer 0 20 ;
850- unsafe_read_into_exactly ic buffer 20 bsize >> = fun () ->
848+ let buffer = Bytes. create (Marshal. header_size + bsize) in
849+ Bytes. unsafe_blit header 0 buffer 0 Marshal. header_size ;
850+ unsafe_read_into_exactly ic buffer Marshal. header_size bsize >> = fun () ->
851851 Lwt. return (Marshal. from_bytes buffer 0 )
852852
853853 (* +---------------------------------------------------------------+
You can’t perform that action at this time.
0 commit comments