git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Kernel - Fixes from clang's scan-build tool
[tpg/acess2.git]
/
Kernel
/
system.c
diff --git
a/Kernel/system.c
b/Kernel/system.c
index
5450883
..
66f645f
100644
(file)
--- a/
Kernel/system.c
+++ b/
Kernel/system.c
@@
-82,7
+82,7
@@
void System_Init(char *CommandLine)
System_ExecuteCommandLine();
// - Execute the Config Script
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
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);
// 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);
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--; )
{
// 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 {
args[k] = atoi(line->Parts[k+1]);
}
else {
UCC
git Repository :: git.ucc.asn.au