JuliaComputing / AMQPClient.jl

A Julia AMQP (Advanced Message Queuing Protocol) / RabbitMQ Client.
Other
39 stars 21 forks source link

showing TAMQPShortStr deletes its contents #21

Closed vsaase closed 4 years ago

vsaase commented 5 years ago

create an TAMQPShortStr: a = AMQPClient.TAMQPShortStr(length(s), Vector{UInt8}(codeunits(String(s)))); then show it show(a) which prints fine

then show it again show(a) nothing is printed and a.data is 0-element Array{UInt8,1}

the problem is that String(convert(Vector{UInt8}, a.data)) (line 2 in convert.jl) deletes the content of a.data I dont know why that is, but String(convert(Vector{UInt8}, copy(a.data))) might solve it #22

tanmaykm commented 4 years ago

fixed via #22