mirror of
https://github.com/johnwhitington/cpdf-source.git
synced 2025-06-05 22:09:39 +02:00
Octal digits go 0..7 not 0..9!
This commit is contained in:
2
cpdf.ml
2
cpdf.ml
@@ -1698,7 +1698,7 @@ let split_at_newline t =
|
|||||||
|
|
||||||
let rec unescape_chars prev = function
|
let rec unescape_chars prev = function
|
||||||
| [] -> rev prev
|
| [] -> 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
|
let chr = char_of_int (int_of_string ("0o" ^ implode [a;b;c])) in
|
||||||
unescape_chars (chr::prev) t
|
unescape_chars (chr::prev) t
|
||||||
| '\\'::'\\'::t -> unescape_chars ('\\'::prev) t
|
| '\\'::'\\'::t -> unescape_chars ('\\'::prev) t
|
||||||
|
Reference in New Issue
Block a user