aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2015-07-21 22:02:52 +0300
committerEugene Sandulenko2015-12-15 00:05:02 +0100
commit75882daa498618bba82fe9494f6d7b803e5e8c46 (patch)
treed12084e9464847787b06523b1aa516823c46055e
parentda0ee48ab941185749f639e884b79e9892dfca82 (diff)
downloadscummvm-rg350-75882daa498618bba82fe9494f6d7b803e5e8c46.tar.gz
scummvm-rg350-75882daa498618bba82fe9494f6d7b803e5e8c46.tar.bz2
scummvm-rg350-75882daa498618bba82fe9494f6d7b803e5e8c46.zip
LAB: Simplify decrypt()
-rw-r--r--engines/lab/labtext.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/engines/lab/labtext.cpp b/engines/lab/labtext.cpp
index 4284865847..568ad828bf 100644
--- a/engines/lab/labtext.cpp
+++ b/engines/lab/labtext.cpp
@@ -154,12 +154,8 @@ void freeLabText() {
/* Decrypts a chunk of text. */
/*****************************************************************************/
void decrypt(byte *text) {
- if (text == NULL)
- return;
-
- while (*text != '\0') {
- (*text) -= (byte)95;
- text++;
+ while (text && *text != '\0') {
+ *text++ -= (byte)95;
}
}