From 75882daa498618bba82fe9494f6d7b803e5e8c46 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 21 Jul 2015 22:02:52 +0300 Subject: LAB: Simplify decrypt() --- engines/lab/labtext.cpp | 8 ++------ 1 file 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; } } -- cgit v1.2.3