diff --git a/src/print.c b/src/print.c index a0ab8f9..d3d849c 100644 --- a/src/print.c +++ b/src/print.c @@ -112,8 +112,17 @@ int patty_print_frame(FILE *fh, goto error_io; } } else if (PATTY_AX25_CONTROL_UNNUMBERED(frame->control)) { - if (fprintf(fh, " type U info %zu bytes", - frame->infolen) < 0) { + if (fprintf(fh, " type U") < 0) { + goto error_io; + } + + if (PATTY_AX25_CONTROL_UNNUMBERED_INFO(frame->control)) { + if (fprintf(fh, " info %zu bytes", frame->infolen) < 0) { + goto error_io; + } + } + } else if (PATTY_AX25_CONTROL_SUPER(frame->control)) { + if (fprintf(fh, " type S") < 0) { goto error_io; } }