Skip to content

Commit

Permalink
[7090] Crash fix CMSG_REQUEST_ACCOUNT_DATA in case empty data string.
Browse files Browse the repository at this point in the history
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
  • Loading branch information
delavega authored and VladimirMangos committed Jan 15, 2009
1 parent a733d6f commit a8b1cdd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/game/MiscHandler.cpp
Expand Up @@ -955,7 +955,7 @@ void WorldSession::HandleRequestAccountData(WorldPacket& recv_data)
dest.resize(size);

uLongf destSize = size;
if(compress(const_cast<uint8*>(dest.contents()), &destSize, (uint8*)adata->Data.c_str(), size) != Z_OK)
if(size && compress(const_cast<uint8*>(dest.contents()), &destSize, (uint8*)adata->Data.c_str(), size) != Z_OK)
{
sLog.outDebug("RAD: Failed to compress account data");
return;
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "7089"
#define REVISION_NR "7090"
#endif // __REVISION_NR_H__

0 comments on commit a8b1cdd

Please sign in to comment.