Skip to content

Commit

Permalink
Replace smallest 32-bit signed integer with abbreviation (#168)
Browse files Browse the repository at this point in the history
* Replace smallest 32-bit signed integer with abbreviation

* Update source-map.bs
  • Loading branch information
jkup authored Jan 14, 2025
1 parent 1581d56 commit 5bf2e0e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions source-map.bs
Original file line number Diff line number Diff line change
Expand Up @@ -612,9 +612,7 @@ To <dfn>decode a base64 VLQ</dfn> from a [=string=] |segment| given a [=position
1. If |value| is greater than or equal to 2<sup>31</sup>, throw an error.
1. Multiply |nextShift| by 32.
1. Advance |position| by 1.
1. If |value| is 0 and |sign| is -1, return -2147483648.

NOTE: -2147483648 is the smallest 32-bit signed integer.
1. If |value| is 0 and |sign| is -1, return -2<sup>31</sup>.
1. Return |value| * |sign|.

NOTE: In addition to returning the decoded value, this algorithm updates the [=position variable=]
Expand Down

0 comments on commit 5bf2e0e

Please sign in to comment.