Skip to content
This repository was archived by the owner on Dec 22, 2021. It is now read-only.

Commit 530d309

Browse files
authored
Improve parse error message and add null-byte in comments test (#1372)
1 parent 397399a commit 530d309

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

interpreter/binary/decode.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ let module_ s =
808808
iterate custom_section s;
809809
let datas = data_section s in
810810
iterate custom_section s;
811-
require (pos s = len s) s (len s) "junk after last section";
811+
require (pos s = len s) s (len s) "unexpected content after last section";
812812
require (List.length func_types = List.length func_bodies)
813813
s (len s) "function and code section have inconsistent lengths";
814814
require (data_count = None || data_count = Some (Lib.List32.length datas))

test/core/binary.wast

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1760,5 +1760,5 @@
17601760
"\02\00"
17611761
"\0b" ;; end
17621762
)
1763-
"junk after last section"
1763+
"unexpected content after last section"
17641764
)

test/core/comments.wast

71 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)