Merge pull request #52 from lioncash/init

PAK: Zero initialize m_sz and m_pos of PAKEntryReadStream
This commit is contained in:
Phillip Stephens 2019-09-05 01:08:59 -07:00 committed by GitHub
commit d075ae209b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -18,12 +18,12 @@ namespace DataSpec {
/** PAK entry stream reader */ /** PAK entry stream reader */
class PAKEntryReadStream : public athena::io::IStreamReader { class PAKEntryReadStream : public athena::io::IStreamReader {
std::unique_ptr<atUint8[]> m_buf; std::unique_ptr<atUint8[]> m_buf;
atUint64 m_sz; atUint64 m_sz = 0;
atUint64 m_pos; atUint64 m_pos = 0;
public: public:
PAKEntryReadStream() {} PAKEntryReadStream() = default;
operator bool() const { return m_buf.operator bool(); } explicit operator bool() const { return m_buf.operator bool(); }
PAKEntryReadStream(const PAKEntryReadStream& other) = delete; PAKEntryReadStream(const PAKEntryReadStream& other) = delete;
PAKEntryReadStream(PAKEntryReadStream&& other) = default; PAKEntryReadStream(PAKEntryReadStream&& other) = default;
PAKEntryReadStream& operator=(const PAKEntryReadStream& other) = delete; PAKEntryReadStream& operator=(const PAKEntryReadStream& other) = delete;