From c1bc1bd4b11d06450e7e014db78f8788c2f3377f Mon Sep 17 00:00:00 2001 From: Shpaky Date: Tue, 1 Dec 2020 18:43:25 +0300 Subject: [PATCH] fix - 'asciiz/1' function of 'emysql_auth' module was fixed --- src/emysql_auth.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/emysql_auth.erl b/src/emysql_auth.erl index d35745ad..5b90b206 100644 --- a/src/emysql_auth.erl +++ b/src/emysql_auth.erl @@ -200,5 +200,7 @@ hash([], N1, N2, _Add) -> {N1 band Mask , N2 band Mask}. asciiz(Data) when is_binary(Data) -> - [S, R] = binary:split(Data, <<0>>), - {S, R}. + case binary:split(Data, <<0>>) of + [S1, R] -> {S1, R}; + [S2] -> {S2, <<>>} + end.