Browse Source

Checking unsigned variable less than zero

Unsinged variable can not be less than zero
Makes sense only to check if it is equal
Mikhail Lappo 4 years ago
parent
commit
8524faddd3
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      asn1_decoder.cpp

+ 2
- 2
asn1_decoder.cpp View File

@@ -19,14 +19,14 @@
19 19
 #include <stdint.h>
20 20
 
21 21
 int asn1_context::peek_byte() const {
22
-  if (length_ <= 0) {
22
+  if (length_ == 0) {
23 23
     return -1;
24 24
   }
25 25
   return *p_;
26 26
 }
27 27
 
28 28
 int asn1_context::get_byte() {
29
-  if (length_ <= 0) {
29
+  if (length_ == 0) {
30 30
     return -1;
31 31
   }
32 32