From 8b79ededd90841bdd59fea496c7af831f5b13f1a Mon Sep 17 00:00:00 2001 From: Ted John Date: Sun, 24 Jul 2016 11:36:21 +0100 Subject: [PATCH] Fix #4164: Keep on crashing on OpenRCT2 0.0.5 Caused by hrow; instead of hrow Exception() when the image table is too large. --- src/core/Exception.hpp | 2 +- src/object/ImageTable.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/Exception.hpp b/src/core/Exception.hpp index c453547fd2..23c80ae4b4 100644 --- a/src/core/Exception.hpp +++ b/src/core/Exception.hpp @@ -24,7 +24,7 @@ class Exception : public std::exception { public: - Exception() : Exception(nullptr) { } + Exception() : Exception("") { } Exception(const char * message) : Exception(std::string(message)) { } diff --git a/src/object/ImageTable.cpp b/src/object/ImageTable.cpp index 558ac3ce00..fb58101538 100644 --- a/src/object/ImageTable.cpp +++ b/src/object/ImageTable.cpp @@ -47,7 +47,7 @@ void ImageTable::Read(IReadObjectContext * context, IStream * stream) if (_data == nullptr) { context->LogError(OBJECT_ERROR_BAD_IMAGE_TABLE, "Image table too large."); - throw; + throw Exception(); } // Read g1 element headers