Skip to content

Commit

Permalink
fixex throw_r_error may crash R session extendr#716 (extendr#718)
Browse files Browse the repository at this point in the history
  • Loading branch information
CGMossa authored Mar 30, 2024
1 parent 9005284 commit 1895bfc
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 59 deletions.
2 changes: 1 addition & 1 deletion extendr-macros/src/wrappers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ pub fn make_function_wrappers(
// included in panic. The advantage would be the panic cause could be included
// in the R terminal error message and not only via std-err.
// but it should be handled in a separate function and not in-lined here.
let err_string = format!("user function panicked: {}\0",#r_name_str);
let err_string = format!("user function panicked: {}",#r_name_str);
// cannot use throw_r_error here for some reason.
// handle_panic() exports err string differently than throw_r_error.
extendr_api::handle_panic(err_string.as_str(), || panic!());
Expand Down
Loading

0 comments on commit 1895bfc

Please sign in to comment.