Skip to content
Snippets Groups Projects
Commit 9fb2a830 authored by Kostyantyn Vorobyov's avatar Kostyantyn Vorobyov
Browse files

Merge branch 'fix/backtrace' into 'master'

avoid crash when printing backtrace

See merge request !116
parents 9c02adc0 047c3257
No related branches found
No related tags found
No related merge requests found
...@@ -55,9 +55,16 @@ static void trace() { ...@@ -55,9 +55,16 @@ static void trace() {
char *prefix = (counter) ? " - " : ""; char *prefix = (counter) ? " - " : "";
if (ipr) { if (ipr) {
char *outs = (char*)ipr->stdouts; char *outs = (char*)ipr->stdouts;
outs[strlen(outs)-1] = '\0'; if (outs) {
if (strlen(outs) && endswith(outs, "??:0") && endswith(outs, "??:?")) { outs[strlen(outs)-1] = '\0';
printf("%s%s\n", prefix, outs); if (strlen(outs) && endswith(outs, "??:0") && endswith(outs, "??:?")) {
printf("%s%s\n", prefix, outs);
}
} else {
char *errs = (char*)ipr->stderrs;
if (errs) {
printf("%s\n", errs);
}
} }
} }
bb++; bb++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment