when passed to Printf, %l%n%L should be interepreted as %u, not %d

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14818 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Gabriel Scherer 2014-05-12 15:37:52 +00:00
parent 689d9aff79
commit e69ee15ef7
1 changed files with 2 additions and 2 deletions

View File

@ -989,9 +989,9 @@ fun k o acc fmt -> match fmt with
| Scan_get_counter (_, rest) ->
(* This case should be refused for Printf. *)
(* Accepted for backward compatibility. *)
(* Interpret %l, %n and %L as %d. *)
(* Interpret %l, %n and %L as %u. *)
fun n ->
let new_acc = Acc_string (acc, format_int "%d" n) in
let new_acc = Acc_string (acc, format_int "%u" n) in
make_printf k o new_acc rest
| Ignored_param (ign, rest) ->
make_ignored_param k o acc ign rest