summaryrefslogtreecommitdiffstats
path: root/stdlib/printf.ml
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2003-03-12 16:40:35 +0000
committerDamien Doligez <damien.doligez-inria.fr>2003-03-12 16:40:35 +0000
commitf0dd3c5ae78f130b3ba02bf568e04465b0933b94 (patch)
tree8e92850a609f14a86a3a1384bfffa36f19360c8b /stdlib/printf.ml
parent91445a83d28b73d7c263f5057766ebb31ea7b3fb (diff)
bug de printf "%8s" x qui tronquait x a 8 caracteres
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5436 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib/printf.ml')
-rw-r--r--stdlib/printf.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/stdlib/printf.ml b/stdlib/printf.ml
index c8c336203..740758116 100644
--- a/stdlib/printf.ml
+++ b/stdlib/printf.ml
@@ -41,7 +41,7 @@ let parse_format format =
on the right if [neg] is true, on the left otherwise. *)
let pad_string pad_char p neg s i len =
if p = len && i = 0 then s else
- if p <= len then String.sub s i p else
+ if p <= len then String.sub s i len else
let res = String.make p pad_char in
if neg
then String.blit s i res 0 len