34 lines
933 B
Diff
34 lines
933 B
Diff
|
From f45648c58c18f35507475363e12a33589fb6a5f2 Mon Sep 17 00:00:00 2001
|
||
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||
|
Date: Wed, 8 Nov 2017 18:05:31 +0000
|
||
|
Subject: [PATCH 2/2] ocaml/t/hivex_200_write.ml: Use Bytes instead of String.
|
||
|
|
||
|
---
|
||
|
ocaml/t/hivex_200_write.ml | 4 ++--
|
||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/ocaml/t/hivex_200_write.ml b/ocaml/t/hivex_200_write.ml
|
||
|
index f70deee..97d9597 100644
|
||
|
--- a/ocaml/t/hivex_200_write.ml
|
||
|
+++ b/ocaml/t/hivex_200_write.ml
|
||
|
@@ -55,14 +55,14 @@ let () =
|
||
|
and utf16le_of_ascii str =
|
||
|
let len = String.length str in
|
||
|
let len' = len * 2 + 2 in
|
||
|
- let str' = String.create len' in
|
||
|
+ let str' = Bytes.create len' in
|
||
|
for i = 0 to len-1 do
|
||
|
str'.[i*2] <- str.[i];
|
||
|
str'.[i*2+1] <- '\000'
|
||
|
done;
|
||
|
str'.[len'-2] <- '\000';
|
||
|
str'.[len'-1] <- '\000';
|
||
|
- str'
|
||
|
+ Bytes.to_string str'
|
||
|
in
|
||
|
iter 0 0 (Hivex.root h);
|
||
|
|
||
|
--
|
||
|
2.13.1
|
||
|
|