From 355998bab3003775aad0ba63ac29bdc44b2041a2 Mon Sep 17 00:00:00 2001 From: Guillaume Baudart Date: Wed, 31 Oct 2012 15:56:06 +0100 Subject: [PATCH] Fix printf typing --- compiler/utilities/global/printf_parser.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/utilities/global/printf_parser.ml b/compiler/utilities/global/printf_parser.ml index 8a429fa..bf340a1 100644 --- a/compiler/utilities/global/printf_parser.ml +++ b/compiler/utilities/global/printf_parser.ml @@ -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