From fcec57c84fd6d6de668ec6095ab5ae2d2ad662d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Sat, 15 Feb 2014 19:28:49 +0100 Subject: [PATCH] Fix alloc_binary param order --- c_src/repository.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_src/repository.c b/c_src/repository.c index edd7cb9..867e3ee 100644 --- a/c_src/repository.c +++ b/c_src/repository.c @@ -88,7 +88,7 @@ geef_repository_discover(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]) if (error < 0) return geef_error(env); - if (!enif_alloc_binary(&path, strlen(buf.ptr))) + if (!enif_alloc_binary(strlen(buf.ptr), &path)) return geef_oom(env); memcpy(path.data, buf.ptr, path.size);