diff --git a/include/Athena/Utility.hpp b/include/Athena/Utility.hpp index 0e660df..2e3f910 100644 --- a/include/Athena/Utility.hpp +++ b/include/Athena/Utility.hpp @@ -40,7 +40,7 @@ double swapDouble(double val); bool isSystemBigEndian(); -void fillRandom(atUint8 * rndArea, atUint8 count); +void fillRandom(atUint8 * rndArea, atUint64 count); std::vector split(const std::string &s, char delim); std::string join(const std::vector& elems, const std::string& delims); diff --git a/src/Athena/BinaryWriter.cpp b/src/Athena/BinaryWriter.cpp index 6f4aa41..4f42bb0 100644 --- a/src/Athena/BinaryWriter.cpp +++ b/src/Athena/BinaryWriter.cpp @@ -64,8 +64,6 @@ BinaryWriter::BinaryWriter(const std::string& filename, std::function BinaryWriter::~BinaryWriter() { - if (isOpen()) - save(); delete[] m_data; m_data = nullptr; } diff --git a/src/Athena/Utility.cpp b/src/Athena/Utility.cpp index b26a0f7..62c65e3 100644 --- a/src/Athena/Utility.cpp +++ b/src/Athena/Utility.cpp @@ -77,9 +77,9 @@ bool isSystemBigEndian() return (*(atUint16*)test == 0xFEFF); } -void fillRandom(atUint8 * rndArea, atUint8 count) +void fillRandom(atUint8 * rndArea, atUint64 count) { - for(atUint16 i = 0; i < count; i++) + for(atUint64 i = 0; i < count; i++) rndArea[i]=rand(); }