Skip to content

Commit 5414bf1

Browse files
Fix bounds check on names field decoding (tc39#214)
Co-authored-by: Nicolò Ribaudo <[email protected]>
1 parent 0cfd8a6 commit 5414bf1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec.emu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@
977977
1. Let _name_ be *null*.
978978
1. If |Name| is present, then
979979
1. Perform DecodeMappingsField of |Name| with arguments _state_, _mappings_, _names_ and _sources_.
980-
1. If _state_.[[NameIndex]] &lt; 0 or _state_.[[NameIndex]] ≥ the number of elements of _sources_, optionally report an error.
980+
1. If _state_.[[NameIndex]] &lt; 0 or _state_.[[NameIndex]] ≥ the number of elements of _names_, optionally report an error.
981981
1. Else, set _name_ to _names_[_state_.[[NameIndex]]].
982982
1. Let _decodedMapping_ be a new DecodedMappingRecord { [[GeneratedPosition]]: _generatedPosition_, [[OriginalPosition]]: _originalPosition_, [[Name]]: _name_ }.
983983
1. Append _decodedMapping_ to _mappings_.

0 commit comments

Comments
 (0)