From dcb54932cbf56d008e952f51ac46858a8fe1912e Mon Sep 17 00:00:00 2001
From: Florian Kaltenberger <florian.kaltenberger@eurecom.fr>
Date: Wed, 17 Sep 2014 08:46:57 +0000
Subject: [PATCH] bugfix in file_output.c

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5791 818b1a75-f10b-46b9-bf7c-635c3b92a50f
---
 openair1/PHY/TOOLS/file_output.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/openair1/PHY/TOOLS/file_output.c b/openair1/PHY/TOOLS/file_output.c
index fb903889b74..f2e6af25344 100755
--- a/openair1/PHY/TOOLS/file_output.c
+++ b/openair1/PHY/TOOLS/file_output.c
@@ -32,6 +32,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+
 int write_output(const char *fname,const char *vname,void *data,int length,int dec,char format) {
 
   FILE *fp;
@@ -48,7 +49,6 @@ int write_output(const char *fname,const char *vname,void *data,int length,int d
    else if (format != 10 && format !=11  && format != 12 ) 
    {
 	   fp = fopen(fname,"w+");
-       fprintf(fp,"%s = [",vname);
    }
   
 
@@ -58,6 +58,8 @@ int write_output(const char *fname,const char *vname,void *data,int length,int d
     return(-1);
   }
 
+  if (format != 10 && format !=11  && format != 12 ) 
+    fprintf(fp,"%s = [",vname);
   
    
   switch (format) 
-- 
GitLab