aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/authserver/Authentication/AuthCodes.h2
-rw-r--r--src/server/authserver/Server/BattlenetBitStream.h8
-rw-r--r--src/server/shared/Utilities/Util.cpp2
3 files changed, 9 insertions, 3 deletions
diff --git a/src/server/authserver/Authentication/AuthCodes.h b/src/server/authserver/Authentication/AuthCodes.h
index 12c2a810abb..158029bcefc 100644
--- a/src/server/authserver/Authentication/AuthCodes.h
+++ b/src/server/authserver/Authentication/AuthCodes.h
@@ -75,6 +75,8 @@ namespace Battlenet
enum AuthResult
{
AUTH_OK = 0,
+ AUTH_INTERNAL_ERROR = 100,
+ AUTH_CORRUPTED_MODULE = 102,
AUTH_BAD_SERVER_PROOF = 103,
AUTH_UNKNOWN_ACCOUNT = 104,
AUTH_CLOSED = 105,
diff --git a/src/server/authserver/Server/BattlenetBitStream.h b/src/server/authserver/Server/BattlenetBitStream.h
index 9d5f4c85f0d..bff1bffb3ab 100644
--- a/src/server/authserver/Server/BattlenetBitStream.h
+++ b/src/server/authserver/Server/BattlenetBitStream.h
@@ -61,7 +61,7 @@ namespace Battlenet
_writePos = (_writePos + 7) & ~7;
}
- std::string ReadString(uint32 bitCount, uint32 baseLength = 0)
+ std::string ReadString(uint32 bitCount, int32 baseLength = 0)
{
uint32 len = Read<uint32>(bitCount) + baseLength;
AlignToNextByte();
@@ -120,7 +120,11 @@ namespace Battlenet
return ret;
}
- //WriteString
+ void WriteString(std::string const& str, uint32 bitCount, int32 baseLength = 0)
+ {
+ Write(str.length() + baseLength, bitCount);
+ WriteBytes(str.c_str(), str.length());
+ }
template<typename T>
void WriteBytes(T* data, uint32 count)
diff --git a/src/server/shared/Utilities/Util.cpp b/src/server/shared/Utilities/Util.cpp
index 004335422c0..05d5d2c0749 100644
--- a/src/server/shared/Utilities/Util.cpp
+++ b/src/server/shared/Utilities/Util.cpp
@@ -561,7 +561,7 @@ void HexStrToByteArray(std::string const& str, uint8* out, bool reverse /*= fals
if (reverse)
{
init = str.length() - 2;
- end = -1;
+ end = -2;
op = -1;
}