Permalink
Browse files

[fix] parser_utils.ml,tag,error: guard against bad access exception

  • Loading branch information...
1 parent fa740bc commit e9e34a35451b11d0f02b9eca10289ee79d1ec169 @OpaOnWindowsNow OpaOnWindowsNow committed Oct 22, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 compiler/opalang/classic_syntax/parser_utils.ml
@@ -1143,7 +1143,7 @@ let count_open_tags tag =
!n
let rec find_next_tag context pos tag_open tag_close=
- let cmp sub pos1 = sub = String.sub context pos1 (String.length sub) in
+ let cmp sub pos1 = try sub = String.sub context pos1 (String.length sub) with _ -> false in
try(
let s1 = String.index_from context pos '<' in
if cmp tag_open s1

0 comments on commit e9e34a3

Please sign in to comment.