cleanup
- fix possible crash in conc (but it's still an ugly hack) - fix noob usage of strcmp - flag some memory leaks (it would be nice, if the author(s) would clean up the mess himself) - fix crash in substr - whitespace cleanup there are plenty more memory leaks in command.cpp - for example, every goto in cubescript does not clean up anything
This commit is contained in:
@@ -905,7 +905,7 @@ struct killmessagesfile : serverconfigfile
|
||||
{
|
||||
l = p; p += strlen(p) + 1;
|
||||
l = strtok(l, sep);
|
||||
|
||||
|
||||
char *message;
|
||||
if(l)
|
||||
{
|
||||
@@ -916,7 +916,7 @@ struct killmessagesfile : serverconfigfile
|
||||
{
|
||||
int errors = 0;
|
||||
int gun = atoi(s);
|
||||
|
||||
|
||||
s += strlen(s) + 1;
|
||||
while(s[0] == ' ') s++;
|
||||
int hasquotes = strspn(s, "\"");
|
||||
@@ -931,7 +931,7 @@ struct killmessagesfile : serverconfigfile
|
||||
if(end) break;
|
||||
}
|
||||
if(end) message[end-message] = '\0';
|
||||
|
||||
|
||||
if(gun < 0 || gun >= NUMGUNS)
|
||||
{
|
||||
logline(ACLOG_INFO, " error in line %i, invalid gun : %i", line, gun);
|
||||
|
||||
Reference in New Issue
Block a user