Fix alloc_binary param order

This commit is contained in:
Carlos Martín Nieto
2014-02-15 19:28:49 +01:00
parent fe4c72a811
commit fcec57c84f

View File

@@ -88,7 +88,7 @@ geef_repository_discover(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[])
if (error < 0) if (error < 0)
return geef_error(env); return geef_error(env);
if (!enif_alloc_binary(&path, strlen(buf.ptr))) if (!enif_alloc_binary(strlen(buf.ptr), &path))
return geef_oom(env); return geef_oom(env);
memcpy(path.data, buf.ptr, path.size); memcpy(path.data, buf.ptr, path.size);