Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Everytime I create a Ruby String and call mrb_str_cat it gives a Segmentation Fault (using Linux Ubuntu).
Example Code:
mrb_value new_obj = mrb_obj_new(mrb, mrb->string_class, 0, NULL); const char* test_str = "test"; new_obj = mrb_str_cat(mrb, new_obj, test_str, 4);
I reverted str_buf_cat master to 1.2.0 on "string.c" and the Segmentation Fault stopped.
The text was updated successfully, but these errors were encountered:
Just a guess, but that sounds like new_obj is not fully initialized. Perhaps try using mrb_str_new_lit() to initialize it.
Sorry, something went wrong.
Yes, use mrb_str_new* to create string objects.
mrb_str_new*
String#initialize to make a string empty; ref #3574
d27a3d4
mrb_str_new worked! Thanks very much!
mrb_str_new
No branches or pull requests
Everytime I create a Ruby String and call mrb_str_cat it gives a Segmentation Fault (using Linux Ubuntu).
Example Code:
I reverted str_buf_cat master to 1.2.0 on "string.c" and the Segmentation Fault stopped.
The text was updated successfully, but these errors were encountered: