From 8524faddd3ab954893312c249c277981e6c26d75 Mon Sep 17 00:00:00 2001 From: Mikhail Lappo Date: Thu, 23 Mar 2017 17:07:39 +0100 Subject: Checking unsigned variable less than zero Unsinged variable can not be less than zero Makes sense only to check if it is equal --- asn1_decoder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asn1_decoder.cpp b/asn1_decoder.cpp index a9dfccc58..285214f16 100644 --- a/asn1_decoder.cpp +++ b/asn1_decoder.cpp @@ -19,14 +19,14 @@ #include int asn1_context::peek_byte() const { - if (length_ <= 0) { + if (length_ == 0) { return -1; } return *p_; } int asn1_context::get_byte() { - if (length_ <= 0) { + if (length_ == 0) { return -1; } -- cgit v1.2.3