From 8140d347ff8c7b248742c4462b69392bda576f58 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Wed, 15 Nov 2017 16:34:37 +1100 Subject: [PATCH] [client] FRAME_TYPE_INVALID is never a valid type to compare --- client/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/main.c b/client/main.c index 9bbe8b58..5e94a7f1 100644 --- a/client/main.c +++ b/client/main.c @@ -80,6 +80,8 @@ void compFunc_BLACK_RLE(uint8_t * dst, const uint8_t * src, const size_t len) inline bool areFormatsSame(const struct KVMGFXHeader s1, const struct KVMGFXHeader s2) { return + (s1.frameType != FRAME_TYPE_INVALID) && + (s2.frameType != FRAME_TYPE_INVALID) && (s1.version == s2.version ) && (s1.frameType == s2.frameType) && (s1.compType == s2.compType ) && @@ -218,7 +220,7 @@ int renderThread(void * unused) } // if the format is invalid or it has changed - if (format.frameType == FRAME_TYPE_INVALID || !areFormatsSame(format, *state.shm)) + if (!areFormatsSame(format, *state.shm)) { if (texture) {