* Fix commit

* Fix LZO implementation (use lzo1x_decompress_safe)
This commit is contained in:
Phillip Stephens 2015-03-01 13:22:59 -08:00
parent c28cfbaba6
commit 190f1e8c17
5 changed files with 53 additions and 53 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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.

View File

@ -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;