diff options
author | Shauren <shauren.trinity@gmail.com> | 2014-11-09 16:57:56 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2014-11-09 16:57:56 +0100 |
commit | 543bea32e16bbe317171d24888a5f0c751ea19e8 (patch) | |
tree | 3475ec61c0812ab9a6025cea6b4e4cd8696b2757 /src/server/shared/Database/Field.h | |
parent | 18cce601b91e34b360a82a07365b6a3491a30ccb (diff) |
Core/DBLayer: Fixed a few mismatched types and possible invalid memory access with aggregate fields in queries
Diffstat (limited to 'src/server/shared/Database/Field.h')
-rw-r--r-- | src/server/shared/Database/Field.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/server/shared/Database/Field.h b/src/server/shared/Database/Field.h index 99f98572a56..352db10c539 100644 --- a/src/server/shared/Database/Field.h +++ b/src/server/shared/Database/Field.h @@ -239,9 +239,11 @@ class Field { char const* string = GetCString(); if (!string) - string = ""; + return ""; + return std::string(string, data.length); } + return std::string((char*)data.value, data.length); } @@ -284,7 +286,7 @@ class Field #endif void SetByteValue(void const* newValue, size_t const newSize, enum_field_types newType, uint32 length); - void SetStructuredValue(char* newValue, enum_field_types newType, uint32 length, bool isBinary); + void SetStructuredValue(char* newValue, enum_field_types newType, uint32 length); void CleanUp() { |