Fix build. no need to make rhash depend on rutil

This commit is contained in:
pancake 2018-02-26 15:09:10 +01:00
parent 4bc314526a
commit 324500731b

View File

@ -345,7 +345,8 @@ R_API char *r_hash_to_string(RHash *ctx, const char *name, const ut8 *data, int
digest_size = r_hash_calculate (ctx, algo, data, len);
r_hash_do_end (ctx, algo);
if (digest_size == 0) {
digest_hex = r_str_newf ("%02.8f", ctx->entropy);
digest_hex = calloc (16, 1);
snprintf (digest_hex, 15, "%02.8f", ctx->entropy);
} else if (digest_size > 0) {
if (digest_size * 2 < digest_size) {
digest_hex = NULL;