1. No output for uncompressed source files.
2. Garbage output after the end of source file.
3. Incorrect line counter work at the bottom of source file.
stream = decompressed;
}
+ else
+ {
+ docSize = bytes.Length - sizeof(int);
+ }
return stream;
}
}
else
printf(" %d\t%s\n", line, toPrint);
}
+ else
+ break; // end of file
}
m_sourceLine = line;
}
sf->text = fileBuff;
sf->lines.push_back(NULL); // The lines count begins from 1, the 0th line is empty
- for(char* bufptr = sf->text; bufptr <= sf->text + fileLen; )
+ for(char* bufptr = sf->text; bufptr < sf->text + fileLen; )
{
sf->lines.push_back(bufptr);
while(*bufptr != '\r')