mirror of https://github.com/libAthena/athena.git
* Fix commit
* Fix LZO implementation (use lzo1x_decompress_safe)
This commit is contained in:
parent
c28cfbaba6
commit
190f1e8c17
|
@ -10,7 +10,7 @@ namespace io
|
|||
class IStreamReader : public IStream
|
||||
{
|
||||
public:
|
||||
virtual ~IStreamReader();
|
||||
virtual ~IStreamReader() {}
|
||||
virtual void setEndian(Endian) = 0;
|
||||
virtual Endian endian() const= 0;
|
||||
virtual bool isBigEndian() const= 0;
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace io
|
|||
class IStreamWriter : public IStream
|
||||
{
|
||||
public:
|
||||
virtual ~IStreamWriter();
|
||||
virtual ~IStreamWriter() {}
|
||||
virtual void setEndian(Endian) = 0;
|
||||
virtual Endian endian() const= 0;
|
||||
virtual bool isBigEndian() const= 0;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#ifndef MEMORYWRITER_HPP
|
||||
#define MEMORYWRITER_HPP
|
||||
|
||||
#include "Athena/IStream.hpp"
|
||||
#include "Athena/IStreamWriter.hpp"
|
||||
#include <string>
|
||||
#include <functional>
|
||||
|
||||
|
@ -33,7 +33,7 @@ namespace io
|
|||
* this allows for fast, flexible code as well as the ability to quickly modify data
|
||||
* \sa Stream
|
||||
*/
|
||||
class MemoryWriter : public IStream
|
||||
class MemoryWriter : public IStreamWriter
|
||||
{
|
||||
public:
|
||||
/*! \brief This constructor takes an existing buffer to write to.
|
||||
|
|
|
@ -109,7 +109,7 @@ atInt32 decompressLZO(const atUint8* source, const atInt32 sourceSize, atUint8*
|
|||
{
|
||||
int srcSize = sourceSize;
|
||||
int size = dstSize;
|
||||
int result = lzo1x_decompress(source, srcSize, dst, (lzo_uintp)&size, NULL);
|
||||
int result = lzo1x_decompress_safe(source, srcSize, dst, (lzo_uintp)&size, NULL);
|
||||
dstSize -= size;
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Reference in New Issue