diff --git a/src/easycsv.c b/src/easycsv.c index 893def5..227c00f 100644 --- a/src/easycsv.c +++ b/src/easycsv.c @@ -728,9 +728,9 @@ _easycsv_priv_init(const char *fp, size_t stfp = strlen(fp); /* Allocate memory for char* */ - // priv->fp = malloc(stfp + 1); // + 1 for null + _priv->fp = malloc(stfp + 1); // + 1 for null - // strncpy(_priv->fp, fp, stfp); + strcpy(_priv->fp, fp); /* Calculate rows and cols if file exists */ if (access(_priv->fp, F_OK) == 0) {