mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
The mappings parser detects a segment that has only a generated column by peeking at the next character. At the end of the mappings string the peek returns an empty string, which is not a separator, so a final generated-only segment is decoded with phantom zero deltas and inherits the source, line, and column of the segment before it. With --enable-source-maps, stack frames in code after the last mapped segment are then attributed to the last mapped source. Check for the end of the string before reading source fields. Signed-off-by: Jacky Zhao <j.zhao2k19@gmail.com> PR-URL: https://github.com/nodejs/node/pull/66264 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>