Merge branch 'master' of swgilluminati.com:DarthArgus/src

This commit is contained in:
DarthArgus
2014-10-27 19:00:24 -07:00
4 changed files with 45 additions and 43 deletions
@@ -59,9 +59,10 @@ void ServerConsole::run()
char inBuf[1024] = {"\0"};
while(! feof(stdin))
{
fread(inBuf, 1024, 1, stdin);
input += inBuf;
memset(inBuf, 0, sizeof(inBuf));
if (fread(inBuf, 1024, 1, stdin)) {
input += inBuf;
memset(inBuf, 0, sizeof(inBuf));
}
}
if(input.length() > 0)
@@ -119,10 +119,11 @@ void Os::installCommon(void)
char buffer[512];
while (!feof(f))
{
fgets(buffer, 512, f);
if (strncmp(buffer, "processor\t: ", 12)==0)
{
processorCount = atoi(buffer+12)+1;
if (fgets(buffer, 512, f) != NULL) {
if (strncmp(buffer, "processor\t: ", 12)==0)
{
processorCount = atoi(buffer+12)+1;
}
}
}
fclose(f);