forked from Mirrors/sngrep
ui: fix raw payload new line print logic #410
This commit is contained in:
parent
3d590febcd
commit
8e30b39448
|
@ -448,12 +448,15 @@ draw_message_pos(WINDOW *win, sip_msg_t *msg, int starting)
|
|||
cur_line =payload + i + 1;
|
||||
|
||||
// Move to the next line if line is filled or a we reach a line break
|
||||
if (column > width || payload[i] == '\n') {
|
||||
if (column > width - 1 || payload[i] == '\n') {
|
||||
line++;
|
||||
column = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
// No need to print new line characters
|
||||
if (payload[i] == '\n')
|
||||
continue;
|
||||
|
||||
// Put next character in position
|
||||
if (isascii(payload[i])) {
|
||||
mvwaddch(win, line, column++, payload[i]);
|
||||
|
|
Loading…
Reference in New Issue