This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via bcd98a45393d9f7273c4d8c589580ff457f3bc1a (commit) from 8da4803c71d9fba0fb5a70c8cc5feccbaf4fdac0 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/bcd98a45393d9f7273c4d8c589580ff457f3b...
commit bcd98a45393d9f7273c4d8c589580ff457f3bc1a Author: Cyril Hrubis metan@ucw.cz Date: Sat Jun 2 00:29:05 2012 +0200
loaders: A few Meta Data fixes.
diff --git a/libs/loaders/GP_MetaData.c b/libs/loaders/GP_MetaData.c index 1403e01..1a7ad93 100644 --- a/libs/loaders/GP_MetaData.c +++ b/libs/loaders/GP_MetaData.c @@ -159,6 +159,7 @@ static GP_MetaRecord *record_create(GP_MetaData *self, const char *id,
strcpy(rec->id, id); rec->hash = hash; + rec->next = NULL; if (self->root == NULL) { self->root = rec; @@ -166,7 +167,6 @@ static GP_MetaRecord *record_create(GP_MetaData *self, const char *id, } else { self->last->next = rec; self->last = rec; - rec->next = NULL; } self->rec_count++; @@ -335,9 +335,9 @@ GP_MetaRecord *GP_MetaDataCreateString(GP_MetaData *self, const char *id, char *s; if (len == 0) - size = strlen(str) + 1; - else - size = len + 1; + len = strlen(str); + + size = len + 1;
/* Play safe with aligment */ if (size % 8) @@ -345,8 +345,8 @@ GP_MetaRecord *GP_MetaDataCreateString(GP_MetaData *self, const char *id,
//TODO: allocation error s = do_alloc(self, size); - strncpy(s, str, size - 1); - s[size - 1] = '0'; + memcpy(s, str, len); + s[len] = '0'; str = s; }
-----------------------------------------------------------------------
Summary of changes: libs/loaders/GP_MetaData.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.