Skip to content

Commit 4ca38ff

Browse files
committed
fix bug in MakePrintf
1 parent 93398d4 commit 4ca38ff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

stdlib/lm_make_printf.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,11 @@ struct
139139

140140
let compute_tag acc =
141141
let buf = Buffer.create 16 in
142-
let rec p_acc b a = match a with
142+
let rec p_acc b = function
143143
Acc_data_string (p, s)
144-
| Acc_string_literal (p, s) -> p_acc b a; Buffer.add_string b s
144+
| Acc_string_literal (p, s) -> p_acc b p; Buffer.add_string b s
145145
| Acc_char_literal (p, c)
146-
| Acc_data_char (p, c) -> p_acc b a; Buffer.add_char b c
146+
| Acc_data_char (p, c) -> p_acc b p; Buffer.add_char b c
147147
| End_of_acc -> ()
148148
| _ -> raise (Invalid_argument "compute_tag: Unsupported print box tag foramt")
149149
in p_acc buf acc;
@@ -188,7 +188,7 @@ struct
188188
| Acc_data_char (p, c) -> print_acc o p; Args.print_char o c
189189
| Acc_delay (p, f) -> print_acc o p; ignore (f o);
190190
| Acc_flush p -> print_acc o p; Args.print_flush o
191-
| Acc_invalid_arg (p, msg) -> print_acc o p; raise (Invalid_argument msg);
191+
| Acc_invalid_arg (p, msg) -> print_acc o p; invalid_arg msg;
192192
| End_of_acc -> ()
193193

194194
let fprintf o (Format (fmt, _)) =

0 commit comments

Comments
 (0)