1
0
mirror of https://github.com/ohwgiles/laminar.git synced 2024-10-27 20:34:20 +00:00

bugfix: wrong log compression limit check operator

This commit is contained in:
Oliver Giles 2017-08-12 17:32:55 +03:00
parent b307e06a87
commit e7aa979303

View File

@ -151,7 +151,7 @@ void Laminar::sendStatus(LaminarClient* client) {
.bind(client->scope.job, client->scope.num) .bind(client->scope.job, client->scope.num)
.fetch<str,int>([=](str maybeZipped, unsigned long sz) { .fetch<str,int>([=](str maybeZipped, unsigned long sz) {
std::string log(sz+1,'\0'); std::string log(sz+1,'\0');
if(sz < COMPRESS_LOG_MIN_SIZE) { if(sz >= COMPRESS_LOG_MIN_SIZE) {
int res = ::uncompress((unsigned char*)&log[0], &sz, int res = ::uncompress((unsigned char*)&log[0], &sz,
(unsigned char*)maybeZipped.data(), maybeZipped.size()); (unsigned char*)maybeZipped.data(), maybeZipped.size());
if(res == Z_OK) if(res == Z_OK)