Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Taudul <wolf.pld@gmail.com>2019-06-22 15:08:48 +0300
committerBartosz Taudul <wolf.pld@gmail.com>2019-06-22 15:08:48 +0300
commitfadf8e3e0a2f6da21d5993dd9dfa0de02c8bbea5 (patch)
tree684480f2036f29b8162cf988ab6164b8b1b908a9 /server/TracyFileRead.hpp
parent1c41229766b0706cebc2767d77f1e4a6d50714e1 (diff)
Can't read negative number of bytes.
This completely ignores error handling, which probably should be added. The code behavior doesn't change, as the existing comparisons and asserts already promoted the signed value to unsigned.
Diffstat (limited to 'server/TracyFileRead.hpp')
-rw-r--r--server/TracyFileRead.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/TracyFileRead.hpp b/server/TracyFileRead.hpp
index 2b07255d..4191ccd0 100644
--- a/server/TracyFileRead.hpp
+++ b/server/TracyFileRead.hpp
@@ -202,7 +202,7 @@ private:
if( fread( &sz, 1, sizeof( sz ), m_file ) == sizeof( sz ) )
{
fread( m_lz4buf, 1, sz, m_file );
- m_lastBlock = LZ4_decompress_safe_continue( m_stream, m_lz4buf, m_second, sz, BufSize );
+ m_lastBlock = (size_t)LZ4_decompress_safe_continue( m_stream, m_lz4buf, m_second, sz, BufSize );
}
else
{
@@ -219,7 +219,7 @@ private:
char* m_buf;
char* m_second;
size_t m_offset;
- int m_lastBlock;
+ size_t m_lastBlock;
std::atomic<bool> m_signalSwitch;
std::atomic<bool> m_signalAvailable;