Fix printf typing
This commit is contained in:
parent
b0e2e41299
commit
355998bab3
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue