aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/base/file/base_file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wintermute/base/file/base_file.cpp')
-rw-r--r--engines/wintermute/base/file/base_file.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/wintermute/base/file/base_file.cpp b/engines/wintermute/base/file/base_file.cpp
index f52a13211e..4589721e7e 100644
--- a/engines/wintermute/base/file/base_file.cpp
+++ b/engines/wintermute/base/file/base_file.cpp
@@ -8,12 +8,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
@@ -57,7 +57,7 @@ bool BaseFile::isEOF() {
Common::SeekableReadStream *BaseFile::getMemStream() {
uint32 oldPos = getPos();
seek(0);
- byte *data = new byte[getSize()];
+ byte *data = (byte *)malloc(getSize());
read(data, getSize());
seek(oldPos);
Common::MemoryReadStream *memStream = new Common::MemoryReadStream(data, getSize(), DisposeAfterUse::YES);
@@ -65,4 +65,4 @@ Common::SeekableReadStream *BaseFile::getMemStream() {
}
-} // end of namespace Wintermute
+} // End of namespace Wintermute