Implement Qualcomm Sahara VIP and fix a few bugs

* Qualcomm Sahara VIP
* Project Cleanup
* Allow unlocking an already unlocked phone
This commit is contained in:
Gustave Monce
2021-08-11 14:33:49 +02:00
parent 9f4c92f437
commit c5fcb1ec8d
72 changed files with 987 additions and 861 deletions
+3 -6
View File
@@ -50,7 +50,7 @@ namespace SevenZip.Compression.LZ
while (true)
{
int size = (int)((0 - _bufferOffset) + _blockSize - _streamPos);
int size = (int)(0 - _bufferOffset + _blockSize - _streamPos);
if (size == 0)
{
return;
@@ -125,12 +125,9 @@ namespace SevenZip.Compression.LZ
// index + limit have not to exceed _keepSizeAfter;
public UInt32 GetMatchLen(Int32 index, UInt32 distance, UInt32 limit)
{
if (_streamEndWasReached)
if (_streamEndWasReached && _pos + index + limit > _streamPos)
{
if (_pos + index + limit > _streamPos)
{
limit = _streamPos - (UInt32)(_pos + index);
}
limit = _streamPos - (UInt32)(_pos + index);
}
distance++;