Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37744938
en ru br
ALT Linux repositórios
S:7.0.0-alt1

Group :: Desenvolvimento/ML
RPM: ocaml-dose3

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: ocaml-dose3-safe-string.patch
Download


diff --git a/common/criteria_lexer.mll b/common/criteria_lexer.mll
index 71f9178..e5a2376 100644
--- a/common/criteria_lexer.mll
+++ b/common/criteria_lexer.mll
@@ -18,7 +18,7 @@
     let c = Lexing.lexeme_char lexbuf 2 in (* the delimiter can be any character *)
     (* find the terminating delimiter *)
     let endpos =
-      try String.index_from lexbuf.lex_buffer (lexbuf.lex_start_pos + 3) c with
+      try String.index_from (Lexing.lexeme lexbuf) (lexbuf.lex_start_pos + 3) c with
       |Invalid_argument _ ->
           raise (Format822.Syntax_error (
             Format822.error lexbuf "String too short"))
@@ -27,7 +27,7 @@
             Format822.error lexbuf (Printf.sprintf "cannot find: %c" c)))
     in
     let len = endpos - (lexbuf.lex_start_pos + 3) in
-    let s = String.sub lexbuf.lex_buffer (lexbuf.lex_start_pos + 3) len in
+    let s = String.sub (Lexing.lexeme lexbuf) (lexbuf.lex_start_pos + 3) len in
     lexbuf.Lexing.lex_curr_pos <- lexbuf.Lexing.lex_start_pos + ((String.length s)+4);
     s
 
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009