Skip to content

Fix a bug in the detection of end-of-file. #73

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 17, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ml-proto/src/host/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let load file =
let rec loop () =
let len = input f buf 0 size in
let source = Bytes.sub_string buf 0 len in
if len < size then source else source ^ loop ()
if len == 0 then source else source ^ loop ()
in
let source = loop () in
close_in f;
Expand Down