Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix a bug in configurator String.take #4046

Merged
merged 3 commits into from
Dec 17, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix a bug in configurator String.take
Signed-off-by: Arseniy Alekseyev <[email protected]>
aalekseyev committed Dec 17, 2020
commit 0c43c789fe540705e3eabfd12845369f3b84ae85
2 changes: 1 addition & 1 deletion otherlibs/configurator/src/import.ml
Original file line number Diff line number Diff line change
@@ -170,7 +170,7 @@ module String = struct
include StringLabels
module Map = Map (String)

let take s i = sub s ~pos:0 ~len:(max i (String.length s))
let take s i = sub s ~pos:0 ~len:(min i (String.length s))

let drop s n =
let len = length s in