summaryrefslogtreecommitdiffstats
path: root/src/Stream.cpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-08-07 17:08:15 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-08-07 17:08:15 +0200
commit8b275c0b0a1064a813ef14a109b64e1fce461893 (patch)
tree7bb1cc13d2eb9be2a344b4cd35f5e581df970f0d /src/Stream.cpp
parent2017-08-05 (diff)
downloadAltCraft-8b275c0b0a1064a813ef14a109b64e1fce461893.tar
AltCraft-8b275c0b0a1064a813ef14a109b64e1fce461893.tar.gz
AltCraft-8b275c0b0a1064a813ef14a109b64e1fce461893.tar.bz2
AltCraft-8b275c0b0a1064a813ef14a109b64e1fce461893.tar.lz
AltCraft-8b275c0b0a1064a813ef14a109b64e1fce461893.tar.xz
AltCraft-8b275c0b0a1064a813ef14a109b64e1fce461893.tar.zst
AltCraft-8b275c0b0a1064a813ef14a109b64e1fce461893.zip
Diffstat (limited to 'src/Stream.cpp')
-rw-r--r--src/Stream.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Stream.cpp b/src/Stream.cpp
index 54b1e1b..3931a40 100644
--- a/src/Stream.cpp
+++ b/src/Stream.cpp
@@ -70,7 +70,7 @@ std::string StreamInput::ReadString() {
ReadData(buff, strLength);
buff[strLength] = 0;
std::string str((char *) buff);
- delete buff;
+ delete[] buff;
return str;
}
@@ -161,7 +161,7 @@ std::vector<unsigned char> StreamInput::ReadByteArray(size_t arrLength) {
unsigned char *buffer = new unsigned char[arrLength];
ReadData(buffer, arrLength);
std::vector<unsigned char> ret(buffer, buffer + arrLength);
- delete buffer;
+ delete[] buffer;
return ret;
}
@@ -311,7 +311,7 @@ StreamBuffer::StreamBuffer(size_t bufferLen) {
}
StreamBuffer::~StreamBuffer() {
- delete buffer;
+ delete[] buffer;
}
std::vector<unsigned char> StreamBuffer::GetBuffer() {