diff options
author | Torbjörn Andersson | 2003-12-11 13:08:36 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2003-12-11 13:08:36 +0000 |
commit | 9f465dab04138478ab143a3d7ab46550a701f06e (patch) | |
tree | 1b422995d363179dddb360dce04df980a0830820 /sword2/protocol.cpp | |
parent | 232fe2889a02ca87ba988da049b00247a1617a25 (diff) | |
download | scummvm-rg350-9f465dab04138478ab143a3d7ab46550a701f06e.tar.gz scummvm-rg350-9f465dab04138478ab143a3d7ab46550a701f06e.tar.bz2 scummvm-rg350-9f465dab04138478ab143a3d7ab46550a701f06e.zip |
cleanup
svn-id: r11581
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) { |