diff options
author | Samuel Mimram <smimram@debian.org> | 2008-01-03 16:26:12 +0000 |
---|---|---|
committer | Samuel Mimram <smimram@debian.org> | 2008-01-03 16:26:12 +0000 |
commit | 2281410e38ef99d025ea77194585a9bc019fdaa9 (patch) | |
tree | 71ba76741c3ab6b752be876565dc34b0b0138dc5 /contrib/recdef/recdef.ml4 | |
parent | 4767d724d489a7ad67f696e9401e70b9f9ae2143 (diff) |
Imported Upstream version 8.1.pl3+dfsgupstream/8.1.pl3+dfsg
Diffstat (limited to 'contrib/recdef/recdef.ml4')
-rw-r--r-- | contrib/recdef/recdef.ml4 | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/contrib/recdef/recdef.ml4 b/contrib/recdef/recdef.ml4 index a4acd9a9..40832677 100644 --- a/contrib/recdef/recdef.ml4 +++ b/contrib/recdef/recdef.ml4 @@ -499,11 +499,12 @@ let rec introduce_all_equalities func eqs values specs bound le_proofs (heq::cond_eqs)] g;; let string_match s = - try - for i = 0 to 3 do - if String.get s i <> String.get "Acc_" i then failwith "string_match" - done; - with Invalid_argument _ -> failwith "string_match" + if String.length s < 3 then failwith "string_match"; + try + for i = 0 to 3 do + if String.get s i <> String.get "Acc_" i then failwith "string_match" + done; + with Invalid_argument _ -> failwith "string_match" let retrieve_acc_var g = (* Julien: I don't like this version .... *) |