diff options
author | Bartosz Taudul <wolf.pld@gmail.com> | 2019-06-22 15:08:48 +0300 |
---|---|---|
committer | Bartosz Taudul <wolf.pld@gmail.com> | 2019-06-22 15:08:48 +0300 |
commit | fadf8e3e0a2f6da21d5993dd9dfa0de02c8bbea5 (patch) | |
tree | 684480f2036f29b8162cf988ab6164b8b1b908a9 /server/TracyFileRead.hpp | |
parent | 1c41229766b0706cebc2767d77f1e4a6d50714e1 (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.hpp | 4 |
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; |