diff options
| author | Maxime Dénès | 2017-03-21 15:26:17 +0100 |
|---|---|---|
| committer | Maxime Dénès | 2017-03-21 15:33:20 +0100 |
| commit | 28d3bb3c8bddc63d038d8d55a34c928675fa9f7b (patch) | |
| tree | 1eb3fd20c42622c9a1ca7f9349068f7301274038 /plugins/extraction/table.ml | |
| parent | becc6ef43a0f838d1f6388e8c7373c13f26082bc (diff) | |
| parent | d25b1431eb73a04bdfc0f1ad2922819b69bba93a (diff) | |
Merge PR#134: Enable `-safe-string`
Diffstat (limited to 'plugins/extraction/table.ml')
| -rw-r--r-- | plugins/extraction/table.ml | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/plugins/extraction/table.ml b/plugins/extraction/table.ml index 5e7d810c93..d6a334c5fe 100644 --- a/plugins/extraction/table.ml +++ b/plugins/extraction/table.ml @@ -773,9 +773,7 @@ let file_of_modfile mp = | MPfile f -> Id.to_string (List.hd (DirPath.repr f)) | _ -> assert false in - let s = String.copy (string_of_modfile mp) in - if s.[0] != s0.[0] then s.[0] <- s0.[0]; - s + String.mapi (fun i c -> if i = 0 then s0.[0] else c) (string_of_modfile mp) let add_blacklist_entries l = blacklist_table := |
