Skip to content

Commit

Permalink
Fix qlc_pt:get_lcid_line/1 with column numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
nox committed Sep 19, 2012
1 parent 5e2c6bf commit 9356e9c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/stdlib/src/qlc_pt.erl
Expand Up @@ -2694,9 +2694,14 @@ get_lcid_no(IdAttrs) ->
{line,Id} = erl_parse:get_attribute(IdAttrs, line),
abs(Id) bsr ?MAX_NUM_OF_LINES.


get_lcid_line(IdAttrs) ->
{line,Id} = erl_parse:get_attribute(IdAttrs, line),
sgn(Id) * (abs(Id) band ((1 bsl ?MAX_NUM_OF_LINES) - 1)).
{location,Loc} = erl_parse:get_attribute(IdAttrs, location),
erl_parse:set_line(
Loc,
fun (Id) ->
sgn(Id) * (abs(Id) band ((1 bsl ?MAX_NUM_OF_LINES) - 1))
end).

sgn(X) when X >= 0 ->
1;
Expand Down

0 comments on commit 9356e9c

Please sign in to comment.