From 691521e411b274e7e2967c4262f7da16c36f1870 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Fri, 5 Apr 2019 10:12:27 -0700 Subject: [PATCH] Avoid comparing unsigned values with < 0 --- src/common/gifdecod.cpp | 2 +- src/common/txtstrm.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/gifdecod.cpp b/src/common/gifdecod.cpp index af945d6589..923aeb814c 100644 --- a/src/common/gifdecod.cpp +++ b/src/common/gifdecod.cpp @@ -887,7 +887,7 @@ wxGIFErrorCode wxGIFDecoder::LoadGIF(wxInputStream& stream) } } - if (m_nFrames <= 0) + if (m_nFrames == 0) { Destroy(); return wxGIF_INVFORMAT; diff --git a/src/common/txtstrm.cpp b/src/common/txtstrm.cpp index d174e4e13f..814efb62b0 100644 --- a/src/common/txtstrm.cpp +++ b/src/common/txtstrm.cpp @@ -108,7 +108,7 @@ wxChar wxTextInputStream::GetChar() // actually read the next character m_lastBytes[inlen] = m_input.GetC(); - if(m_input.LastRead() <= 0) + if (m_input.LastRead() == 0) return 0; m_validEnd++; @@ -358,7 +358,7 @@ wxTextInputStream& wxTextInputStream::operator>>(wxString& word) wxTextInputStream& wxTextInputStream::operator>>(char& c) { c = m_input.GetC(); - if(m_input.LastRead() <= 0) c = 0; + if (m_input.LastRead() == 0) c = 0; if (EatEOL(c)) c = '\n';