From e6bffdc3be89012560318555c4a08e6a11ce4da8 Mon Sep 17 00:00:00 2001 From: Maxime Levillain Date: Fri, 15 Nov 2024 16:17:30 +0100 Subject: [PATCH] fix parse_arg --- src/ppx/ppx_common.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ppx/ppx_common.ml b/src/ppx/ppx_common.ml index 3e512aa..2ddbd10 100644 --- a/src/ppx/ppx_common.ml +++ b/src/ppx/ppx_common.ml @@ -159,7 +159,7 @@ let methods = [ "get"; "post"; "put"; "patch"; "delete" ] let parse_arg ~loc s = match String.index_opt s ':' with | None -> evar ~loc (String.trim s) | Some i -> - let name = String.(trim @@ sub s 0 (i-1)) in + let name = String.(trim @@ sub s 0 i) in let typ = String.(trim @@ sub s (i+1) (length s - i - 1)) in match typ with | "int" | "float" | "int32" | "int64" | "string" ->