From: John Hodge Date: Wed, 2 Mar 2011 05:03:31 +0000 (+0800) Subject: Fixed bug in kernel script parsing (uninitialised value) X-Git-Tag: rel0.10~169 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=d865234182d56b941e939875f8da3e3c45f24fd5;p=tpg%2Facess2.git Fixed bug in kernel script parsing (uninitialised value) --- diff --git a/Kernel/system.c b/Kernel/system.c index 8b457b49..a9960384 100644 --- a/Kernel/system.c +++ b/Kernel/system.c @@ -548,6 +548,7 @@ tConfigFile *System_Int_ParseFile(char *FileData) start = ptr; ret->Lines[i].nParts = 0; + ret->Lines[i].Parts = NULL; // Count parts for(;;) @@ -640,6 +641,12 @@ tConfigFile *System_Int_ParseFile(char *FileData) } } + if( i < ret->nLines ) { + ret->Lines[i].nParts = 0; + ret->Lines[i].Parts = NULL; + Log_Log("System", "Cleaning up final empty line"); + } + LEAVE('p', ret); return ret; }