aboutsummaryrefslogtreecommitdiff
path: root/brlyt.c
diff options
context:
space:
mode:
authormegazig <megazig@megazig-desktop.(none)>2009-05-24 20:39:12 -0500
committermegazig <megazig@megazig-desktop.(none)>2009-05-24 20:39:12 -0500
commitc1cd5fe48d98b56cdf81a5d5ddb6a08a0f2b84dc (patch)
tree889bd97f653557cc48f33cf6307f7f7bfa148613 /brlyt.c
parent9c4cced60e812d5b56368c7f4848a6ca5987df8f (diff)
memories
Diffstat (limited to '')
-rw-r--r--brlyt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/brlyt.c b/brlyt.c
index 6360538..42578a0 100644
--- a/brlyt.c
+++ b/brlyt.c
@@ -2358,7 +2358,7 @@ void WriteBRLYTEntry(mxml_node_t *tree, mxml_node_t *node, u8** tagblob, u32* bl
strcpy(chunk.name, temp);
int numSubs = 0;
char *subs;
- subs=malloc(0);
+ subs = malloc(0 * sizeof(char));
u32 subsLength = 0;
mxml_node_t *subnode = mxmlFindElement(node, node, "subs", NULL, NULL, MXML_DESCEND);
@@ -2384,7 +2384,7 @@ void WriteBRLYTEntry(mxml_node_t *tree, mxml_node_t *node, u8** tagblob, u32* bl
*fileOffset = *fileOffset + sizeof(chunk);
fwrite(subs, sizeof(char) * subsLength, 1, fp);
*fileOffset = *fileOffset + subsLength;
- if (subsLength > 0) free(subs);
+ free(subs);
}
if ( memcmp(temp, grs1, sizeof(grs1)) == 0)
{