diff --git a/eval.c b/eval.c index 6bb2c927..30b6553f 100644 --- a/eval.c +++ b/eval.c @@ -2252,8 +2252,7 @@ sexp sexp_make_opcode (sexp ctx, sexp name, sexp op_class, sexp code, sexp_opcode_data(res) = data; sexp_opcode_data2(res) = data2; sexp_opcode_func(res) = func; - sexp_opcode_name(res) - = strndup(sexp_string_data(name), sexp_string_length(name)+1); + sexp_opcode_name(res) = strdup(sexp_string_data(name)); } return res; } diff --git a/sexp.c b/sexp.c index 2f4388cb..e732005e 100644 --- a/sexp.c +++ b/sexp.c @@ -135,7 +135,7 @@ sexp sexp_register_type (sexp ctx, sexp name, sexp fb, sexp flb, sexp flo, sexp sexp_type_size_base(type) = sexp_unbox_fixnum(sb); sexp_type_size_off(type) = sexp_unbox_fixnum(so); sexp_type_size_scale(type) = sexp_unbox_fixnum(sc); - sexp_type_name(type) = strndup(sexp_string_data(name), sexp_string_length(name)+1); + sexp_type_name(type) = strdup(sexp_string_data(name)); res = sexp_make_fixnum(sexp_type_tag(type)); } return res;