no message

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@761 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2006-12-03 19:56:24 +00:00
parent ac9d1148c7
commit 7decc11a6b
8 changed files with 59 additions and 15 deletions
+2 -2
View File
@@ -376,14 +376,14 @@ void readscfg(char *cfg)
l = buf;
bool lastline = false;
while((p = strstr(l, "\n")) != NULL || (l && (lastline=true))) // remove empty/invalid lines
while((p = strstr(l, "\n")) != NULL || (l[0] && (lastline=true))) // remove empty/invalid lines
{
size_t len = lastline ? strlen(l) : p-l;
string line;
s_strncpy(line, l, len+1);
char *d = line;
int n = 0;
while((p = strstr(d, ":")) != NULL && (d = p+1)) n++;
while((p = strstr(d, ":")) != NULL) { d = p+1; n++; };
if(n!=3) memset(l, ' ', len+1);
if(lastline) { l[len+1] = 0; break; };
l += len+1;