mirror of
https://github.com/pocoproject/poco.git
synced 2025-02-01 06:52:46 +01:00
fixed GH #1599: readFromDevice( ) in AutoDetectStream.cpp in Poco Zip cannot detect signature
This commit is contained in:
parent
c32e683b6c
commit
820a4ed13d
@ -100,8 +100,15 @@ int AutoDetectStreamBuf::readFromDevice(char* buffer, std::streamsize length)
|
||||
{
|
||||
buffer[offset++] = ZipDataInfo::HEADER[i];
|
||||
}
|
||||
_matchCnt = 0;
|
||||
buffer[offset++] = static_cast<char>(c);
|
||||
if (c == ZipDataInfo::HEADER[0])
|
||||
{
|
||||
_matchCnt = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
_matchCnt = 0;
|
||||
buffer[offset++] = static_cast<char>(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (_matchCnt == 3)
|
||||
|
Loading…
x
Reference in New Issue
Block a user