diff --git a/src/error.jl b/src/error.jl index df28e15..af5ecd7 100644 --- a/src/error.jl +++ b/src/error.jl @@ -22,7 +22,7 @@ function strerror(ret, bufsize=1000) ccall((:mbedtls_strerror, libmbedcrypto), Cvoid, (Cint, Ptr{Cvoid}, Csize_t), ret, buf, bufsize) - resize!(buf, something(findfirst(0x00, buf), length(buf) + 1) - 1) + resize!(buf, something(findfirst(iszero, buf), length(buf) + 1) - 1) s = String(buf) if ret == MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE s *= " (You may need to enable `ssl_conf_renegotiation!`. See " *