diff options
Diffstat (limited to 'sword2/protocol.cpp')
-rw-r--r-- | sword2/protocol.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sword2/protocol.cpp b/sword2/protocol.cpp index 1c21a6632c..2154ecfff8 100644 --- a/sword2/protocol.cpp +++ b/sword2/protocol.cpp @@ -203,15 +203,10 @@ uint8 *Sword2Engine::fetchTextLine(uint8 *file, uint32 text_line) { // Used for testing text & speech (see fnISpeak in speech.cpp) -uint8 Sword2Engine::checkTextLine(uint8 *file, uint32 text_line) { +bool Sword2Engine::checkTextLine(uint8 *file, uint32 text_line) { _textHeader *text_header = (_textHeader *) (file + sizeof(_standardHeader)); - // out of range => invalid - if (text_line >= text_header->noOfLines) - return 0; - - // valid - return 1; + return text_line < text_header->noOfLines; } uint8 *Sword2Engine::fetchObjectName(int32 resourceId) { |