X-Git-Url: http://git.jankratochvil.net/?a=blobdiff_plain;ds=sidebyside;f=apps%2Futils%2Fstats%2Fstats.c;h=e60af40d45fd1edcf6a744471def9b72610e8a6b;hb=HEAD;hp=45669648d2c9eda50621fc329970fd3a59a4d295;hpb=7c0db166f81fbe8c8b913d7f26048e337d383605;p=reactos.git diff --git a/apps/utils/stats/stats.c b/apps/utils/stats/stats.c index 4566964..e60af40 100644 --- a/apps/utils/stats/stats.c +++ b/apps/utils/stats/stats.c @@ -229,8 +229,8 @@ ReadLine() return FALSE; i = 0; - while (((j = CurrentOffset + i) < FileBufferSize) && (i < sizeof (Line)) && - ((ch = FileBuffer[j]) != 0x0D)) + while ((((j = CurrentOffset + i) < FileBufferSize) && (i < sizeof (Line)) && + ((ch = FileBuffer[j]) != 0x0D && (ch = FileBuffer[j]) != 0x0A))) { Line[i] = ch; i++; @@ -239,7 +239,7 @@ ReadLine() Line[i] = '\0'; LineLength = i; - if (FileBuffer[CurrentOffset + i + 1] == 0x0A) + if ((FileBuffer[CurrentOffset + i] == 0x0D) && (FileBuffer[CurrentOffset + i + 1] == 0x0A)) CurrentOffset++; CurrentOffset += i + 1;