diff --git a/ext/native/file/chunk_file.cpp b/ext/native/file/chunk_file.cpp index 7fb050abb0..dd627b9522 100644 --- a/ext/native/file/chunk_file.cpp +++ b/ext/native/file/chunk_file.cpp @@ -8,7 +8,6 @@ ChunkFile::ChunkFile(const char *filename, bool _read) { data=0; fn = filename; - fastMode=false; numLevels=0; read=_read; pos=0; diff --git a/ext/native/file/ini_file.cpp b/ext/native/file/ini_file.cpp index 9070bb8079..14d0b6b370 100644 --- a/ext/native/file/ini_file.cpp +++ b/ext/native/file/ini_file.cpp @@ -531,7 +531,7 @@ bool IniFile::Load(std::istream &in) { // Maximum number of letters in a line static const int MAX_BYTES = 1024*32; - while (!in.eof()) + while (!(in.eof() || in.fail())) { char templine[MAX_BYTES]; in.getline(templine, MAX_BYTES); diff --git a/ext/native/image/zim_save.cpp b/ext/native/image/zim_save.cpp index be9bb5485d..ba753a79be 100644 --- a/ext/native/image/zim_save.cpp +++ b/ext/native/image/zim_save.cpp @@ -164,7 +164,7 @@ void Convert(const uint8_t *image_data, int width, int height, int pitch, int fl for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { int dithval = dith[(x&3)+((y&0x3)<<2)] - 8; - dithval = 0; + //dithval = 0; please check this int r = clamp32((image_data[i * 4] + dithval/2) >> 3); int g = clamp64((image_data[i * 4 + 1] + dithval/4) >> 2); int b = clamp32((image_data[i * 4 + 2] + dithval/2) >> 3); diff --git a/ext/native/net/http_client.cpp b/ext/native/net/http_client.cpp index aecee2ae1d..739923519e 100644 --- a/ext/native/net/http_client.cpp +++ b/ext/native/net/http_client.cpp @@ -323,7 +323,8 @@ int Client::ReadResponseEntity(Buffer *readbuf, const std::vector & bool result = decompress_string(compressed, &decompressed); if (!result) { ELOG("Error decompressing using zlib"); - *progress = 0.0f; + if (progress) + *progress = 0.0f; return -1; } output->Append(decompressed);