From 5a47894523d56550ce55a27230cf577dbcd1f681 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Fri, 3 Nov 2017 09:19:52 +0100
Subject: [PATCH] fixing attempt: LLF size in src/adapters/EMGLLF seemed wrong

---
 TODO                        | 1 +
 pkg/src/adapters/a.EMGLLF.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
 create mode 100644 TODO

diff --git a/TODO b/TODO
new file mode 100644
index 0000000..4feab94
--- /dev/null
+++ b/TODO
@@ -0,0 +1 @@
+Apply git-fat patch
diff --git a/pkg/src/adapters/a.EMGLLF.c b/pkg/src/adapters/a.EMGLLF.c
index 1503315..e93b7ec 100644
--- a/pkg/src/adapters/a.EMGLLF.c
+++ b/pkg/src/adapters/a.EMGLLF.c
@@ -56,7 +56,7 @@ SEXP EMGLLF(
 	PROTECT(phi = allocArray(REALSXP, dimPhiS));
 	PROTECT(rho = allocArray(REALSXP, dimRho));
 	PROTECT(pi = allocVector(REALSXP, k));
-	PROTECT(LLF = allocVector(REALSXP, maxi-mini+1));
+	PROTECT(LLF = allocVector(REALSXP, maxi));
 	PROTECT(S = allocArray(REALSXP, dimPhiS));
 	PROTECT(affec = allocVector(INTSXP, n));
 	double *pPhi=REAL(phi), *pRho=REAL(rho), *pPi=REAL(pi), *pLLF=REAL(LLF), *pS=REAL(S);
-- 
2.44.0