Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

hex_file: normalize file line endings

  • Loading branch information...
commit 56079db69b710efeb6471a57aa3e44ff16254759 1 parent 77dc1ef
@msantos authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/stk500.erl
View
5 src/stk500.erl
@@ -171,8 +171,9 @@ hex_file(File) ->
hex_file(intel, File).
hex_file(intel, File) ->
- {ok, Bin} = file:read_file(File),
- Hex = binary:split(Bin, <<"\r\n">>, [global, trim]),
+ {ok, Bin0} = file:read_file(File),
+ Bin = binary:replace(Bin0, <<"\r\n">>, <<"\n">>, [global]),
+ Hex = binary:split(Bin, <<"\n">>, [global, trim]),
rec(Hex).
Please sign in to comment.
Something went wrong with that request. Please try again.