Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
hhugo committed Apr 7, 2020
1 parent 32e7aa9 commit 724ffbf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion runtime/marshal.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ var caml_legacy_custom_code = true
//Requires: MlBytes, caml_ml_bytes_length, caml_bytes_unsafe_get
//Requires: caml_ml_string_length, caml_string_unsafe_get
//Requires: MlObjectTable, caml_list_to_js_array, caml_legacy_custom_code, caml_custom_ops
//Requires: caml_invalid_argument
//Requires: caml_invalid_argument,caml_string_of_jsbytes
var caml_output_val = function (){
function Writer () { this.chunk = []; }
Writer.prototype = {
Expand Down Expand Up @@ -565,6 +565,9 @@ var caml_output_val = function (){
writer.size_64 += v.length;
if (v.length > 1) stack.push (v, 1);
} else if (v instanceof MlBytes) {
if(!(caml_string_of_jsbytes("") instanceof MlBytes)) {
caml_failwith("output_value: [Bytes.t] cannot safely be marshaled with [--enable use-js-string]");
}
if (memo(v)) return;
var len = caml_ml_bytes_length(v);
if (len < 0x20)
Expand Down

0 comments on commit 724ffbf

Please sign in to comment.