Fix printf typing

This commit is contained in:
Guillaume Baudart 2012-10-31 15:56:06 +01:00
parent b0e2e41299
commit 355998bab3

View file

@ -42,7 +42,7 @@ let rec format_of_string s =
let i = String.index s '%' in
let l = format_of_string (tail s (i+2)) in
if i = 0 then
let modifier = String.sub s 0 1 in
let modifier = String.sub s 1 1 in
(Modifier modifier)::l
else
let lit = String.sub s 0 i in
@ -57,6 +57,7 @@ let types_of_format_string s =
| Modifier "b" -> Initial.tbool::acc
| Modifier "d" -> Initial.tint::acc
| Modifier "f" -> Initial.tfloat::acc
| Modifier "s" -> Initial.tstring::acc
| _ -> acc
in
let sl = format_of_string s in