mirror of
https://github.com/libAthena/athena.git
synced 2025-12-09 13:38:03 +00:00
* Fix build
This commit is contained in:
@@ -29,7 +29,7 @@ namespace utility
|
||||
{
|
||||
bool isEmpty(atInt8* buf, atUint32 size)
|
||||
{
|
||||
return buf[0] == 0 && !memcmp(buf, buf + 1, size - 1);
|
||||
return !memcmp(buf, buf + 1, size - 1);
|
||||
}
|
||||
|
||||
atUint16 swapU16(atUint16 val )
|
||||
@@ -73,7 +73,7 @@ atInt64 swap64(atInt64 val)
|
||||
|
||||
bool isSystemBigEndian()
|
||||
{
|
||||
atUint8* test = (atUint8*)"\xFE\xFF";
|
||||
static atUint8* test = (atUint8*)"\xFE\xFF";
|
||||
return (*(atUint16*)test == 0xFEFF);
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ ZQuestFile *ZQuestFileReader::read()
|
||||
ZQuestFile::Game game = ZQuestFile::NoGame;
|
||||
std::string gameString;
|
||||
atUint16 BOM;
|
||||
atUint32 checksum;
|
||||
atUint32 checksum = 0;
|
||||
atUint8* data;
|
||||
|
||||
magic = base::readUint32();
|
||||
@@ -81,7 +81,6 @@ ZQuestFile *ZQuestFileReader::read()
|
||||
{
|
||||
game = (ZQuestFile::Game)base::readUint32();
|
||||
BOM = base::readUint16();
|
||||
std::cerr << "Test" << std::endl;
|
||||
base::seek(0x0A);
|
||||
}
|
||||
|
||||
@@ -110,7 +109,6 @@ ZQuestFile *ZQuestFileReader::read()
|
||||
{
|
||||
delete[] dst;
|
||||
delete[] data;
|
||||
// TODO: Make proper exception
|
||||
THROW_INVALID_DATA_EXCEPTION("Error decompressing data");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user