cake
/
libg1m
Archived
1
0
Fork 0

Little update needs.

This commit is contained in:
Thomas Touhey 2016-12-18 01:58:41 +01:00
parent 01fcefba60
commit c8c9eee50c
1 changed files with 4 additions and 4 deletions

View File

@ -634,6 +634,10 @@ int g1m_parse_mcsfile_content(g1m_mcsfile_t **handle, FILE *stream,
h->type = 0;
strncpy(h->name, (char*)filename, 8);
/* copy raw data */
h->_group[16] = 0; strncpy(h->_group, (char*)groupname, 16);
h->_dirname[8] = 0; strncpy(h->_dirname, (char*)dirname, 8);
/* look for the raw type */
unsigned int type; int id;
if (g1m_mcstype_getlib(groupname, filename, raw_type, &type, &id))
@ -675,10 +679,6 @@ notparsing:;
memcpy(h->content, buf, filesize);
h->content_size = filesize;
/* save the metadata */
h->_group[16] = 0; strncpy(h->_group, (char*)groupname, 16);
h->_dirname[8] = 0; strncpy(h->_dirname, (char*)dirname, 8);
/* log */
log_info("File content:");
logm_info(h->content, h->content_size);