commit | 8524faddd3ab954893312c249c277981e6c26d75 | [log] [tgz] |
---|---|---|
author | Mikhail Lappo <miklelappo@gmail.com> | Thu Mar 23 17:07:39 2017 +0100 |
committer | Mikhail Lappo <miklelappo@gmail.com> | Thu Mar 23 17:07:39 2017 +0100 |
tree | 965f7ca96e76297a82e92a0c633f5cb2ab3d2a63 | |
parent | 17e6d3f3bcd27aedc2ff8fe796ce90dddb04a714 [diff] [blame] |
Checking unsigned variable less than zero Unsinged variable can not be less than zero Makes sense only to check if it is equal
diff --git a/asn1_decoder.cpp b/asn1_decoder.cpp index a9dfccc..285214f 100644 --- a/asn1_decoder.cpp +++ b/asn1_decoder.cpp
@@ -19,14 +19,14 @@ #include <stdint.h> 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; }