Changeset 597 for vendor/current/lib/util/asn1.c
- Timestamp:
- Jul 2, 2011, 4:01:14 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/lib/util/asn1.c
r414 r597 717 717 { 718 718 uint8_t b; 719 bool first_byte = true; 719 720 *i = 0; 720 721 721 722 while (!data->has_error && asn1_tag_remaining(data)>0) { 722 723 if (!asn1_read_uint8(data, &b)) return false; 724 if (first_byte) { 725 if (b & 0x80) { 726 /* Number is negative. 727 Set i to -1 for sign extend. */ 728 *i = -1; 729 } 730 first_byte = false; 731 } 723 732 *i = (*i << 8) + b; 724 733 }
Note:
See TracChangeset
for help on using the changeset viewer.