ne pas afficher de colonne negative

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6611 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Damien Doligez 2004-08-20 17:02:43 +00:00
parent 54aeaa6db4
commit 8030a20089
1 changed files with 2 additions and 0 deletions

View File

@ -207,6 +207,8 @@ let get_pos_info pos =
let print ppf loc =
let (file, line, startchar) = get_pos_info loc.loc_start in
let endchar = loc.loc_end.pos_cnum - loc.loc_start.pos_cnum + startchar in
let startchar = if startchar < 0 then 0 else startchar in
let enchar = if endchar < 0 then 0 else endchar in
if file = "" then begin
if highlight_locations ppf loc none then () else
fprintf ppf "Characters %i-%i:@."