Skip to content

Commit

Permalink
Issue JuliaIO#235: reconstructing type with non-ascii attribute names
Browse files Browse the repository at this point in the history
  • Loading branch information
AmebaBrain committed Mar 22, 2019
1 parent cc660ae commit 70967d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jld_types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ function reconstruct_type(parent::JldFile, dtype::HDF5Datatype, savedname::Abstr
for i = 1:nfields
membername = HDF5.h5t_get_member_name(dtype.id, i-1)
idx = first(something(findlast("_", membername), 0:-1))
fieldname = fieldnames[i] = Symbol(membername[1:idx-1])
fieldname = fieldnames[i] = Symbol(membername[1:prevind(membername,idx)])

if idx != sizeof(membername)
# There is something past the underscore in the HDF5 field
Expand Down

0 comments on commit 70967d2

Please sign in to comment.