X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/e81cf1f1af923bee85d60e896bbbe0491bca4264..3283f75e5ca5fe1193054dfacd5f3a131f17b74d:/emufs_gui/articulos.c?ds=sidebyside diff --git a/emufs_gui/articulos.c b/emufs_gui/articulos.c index defdf7e..91bb4a7 100644 --- a/emufs_gui/articulos.c +++ b/emufs_gui/articulos.c @@ -463,6 +463,7 @@ void *procesar_guardar_articulo(t_Articulo *src, EMUFS_REG_SIZE *size, t_LstArti (*size) = i[0]+i[1]+i[2]+i[3]+i[4]+i[5]; tmp = (char *)malloc((*size)); if (tmp == NULL) return NULL; + memset(tmp, 0, *size); memcpy(tmp, &src->numero, i[0]); memcpy(tmp+i[0], src->desc, i[1]); memcpy(tmp+i[0]+i[1], src->presentacion, i[2]); @@ -475,6 +476,7 @@ void *procesar_guardar_articulo(t_Articulo *src, EMUFS_REG_SIZE *size, t_LstArti * registro se vea bien */ tmp = (char *)malloc(sizeof(t_Articulo)); + memset(tmp, '*', sizeof(t_Articulo)); memcpy(tmp, from, sizeof(t_Articulo)); (*size) = sizeof(t_Articulo); }