Skip to content
Permalink
Browse files
Skip non string values in backtraces; ref #3408
  • Loading branch information
matz committed Jan 23, 2017
1 parent 40ec03c commit 28b7b9ec6441d96d63f309b93f7b486074b807e3
Showing 1 changed file with 3 additions and 1 deletion.
@@ -219,7 +219,9 @@ print_backtrace(mrb_state *mrb, mrb_value backtrace)
for (i = 0; i < n; i++) {
mrb_value entry = RARRAY_PTR(backtrace)[i];

fprintf(stream, "\t[%d] %.*s\n", i, (int)RSTRING_LEN(entry), RSTRING_PTR(entry));
if (mrb_string_p(entry)) {
fprintf(stream, "\t[%d] %.*s\n", i, (int)RSTRING_LEN(entry), RSTRING_PTR(entry));
}
}
}

0 comments on commit 28b7b9e

Please sign in to comment.