Skip to content

Commit

Permalink
minor formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicletz committed Nov 8, 2023
1 parent 29ef310 commit 2194ff5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/libpe/resource_table.ex
Original file line number Diff line number Diff line change
Expand Up @@ -503,9 +503,17 @@ defmodule LibPE.ResourceTable do
end

Keyword.get(opts, :values, false) ->
IO.puts("#{dup(level + 1)} VALUE: #{Base.encode16(data)}")
value =
if String.printable?(data) do
inspect(data, limit: :infinity)
else
"0x" <> Base.encode16(data, case: :lower)
end

IO.puts("#{dup(level + 1)} VALUE: #{value}")

true ->
IO.puts("#{dup(level + 1)} VALUE: #{inspect(data)}")
:ok
end
end
Expand Down

0 comments on commit 2194ff5

Please sign in to comment.