aboutsummaryrefslogtreecommitdiff
path: root/engines/cge/text.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/cge/text.cpp')
-rw-r--r--engines/cge/text.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/cge/text.cpp b/engines/cge/text.cpp
index 2b949ab701..9e5ceac9c4 100644
--- a/engines/cge/text.cpp
+++ b/engines/cge/text.cpp
@@ -43,7 +43,8 @@ Text::Text(CGEEngine *vm, const char *fname) : _vm(vm) {
if (!_cat->exist(_fileName))
error("No talk (%s)\n", _fileName);
int16 txtCount = count() + 1;
- warning("Number of texts: %d", txtCount);
+ if (!txtCount)
+ error("Unable to read dialog file %s", _fileName);
_cache = new Handler[txtCount];
for (_size = 0; _size < txtCount; _size++) {
@@ -61,7 +62,7 @@ Text::~Text() {
int16 Text::count() {
EncryptedStream tf = _fileName;
if (tf.err())
- return NULL;
+ return -1;
Common::String line;
char tmpStr[kLineMax + 1];