X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Fsystem.c;h=66f645f2f5a1d385e52a4e6b27844330e13d7ad8;hb=952891ddb96a341c0e24ecb7dec6361c7bbeaece;hp=54508830573064cbce7303aa9b9f88cba0b925c0;hpb=273ede03312a1b5c537d250403ff11065106e186;p=tpg%2Facess2.git diff --git a/Kernel/system.c b/Kernel/system.c index 54508830..66f645f2 100644 --- a/Kernel/system.c +++ b/Kernel/system.c @@ -82,7 +82,7 @@ void System_Init(char *CommandLine) System_ExecuteCommandLine(); // - Execute the Config Script - Log_Log("Config", "Executing config script..."); + Log_Log("Config", "Executing config script '%s'", gsConfigScript); System_ExecuteScript(); // Set the debug to be echoed to the terminal @@ -318,6 +318,7 @@ void System_ExecuteScript(void) // Get length VFS_Seek(fp, 0, SEEK_END); fLen = VFS_Tell(fp); + Log_Debug("System", "VFS_Tell(%i) = %i", fp, fLen); VFS_Seek(fp, 0, SEEK_SET); // Read into memory buffer fData = malloc(fLen+1); @@ -392,7 +393,7 @@ void System_ExecuteScript(void) // Convert arguments to integers for( k = line->nParts-1; k--; ) { - if( caConfigCommands[j].IntArgs & (1 << k) ) { + if( k < 32 && (caConfigCommands[j].IntArgs & (1 << k)) ) { args[k] = atoi(line->Parts[k+1]); } else {