Octal digits go 0..7 not 0..9!

This commit is contained in:
John Whitington 2015-05-31 15:10:48 +01:00
parent 26378caeff
commit 25668ecfe8

View File

@ -1698,7 +1698,7 @@ let split_at_newline t =
let rec unescape_chars prev = function
| [] -> rev prev
| '\\'::('0'..'9' as a)::('0'..'9' as b)::('0'..'9' as c)::t ->
| '\\'::('0'..'7' as a)::('0'..'7' as b)::('0'..'7' as c)::t ->
let chr = char_of_int (int_of_string ("0o" ^ implode [a;b;c])) in
unescape_chars (chr::prev) t
| '\\'::'\\'::t -> unescape_chars ('\\'::prev) t