diff options
-rw-r--r-- | swaybar/i3bar.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/swaybar/i3bar.c b/swaybar/i3bar.c index ed134a01..6f67ba3a 100644 --- a/swaybar/i3bar.c +++ b/swaybar/i3bar.c | |||
@@ -125,9 +125,12 @@ bool i3bar_handle_readable(struct status_line *status) { | |||
125 | status_error(status, "[failed to allocate buffer]"); | 125 | status_error(status, "[failed to allocate buffer]"); |
126 | return -1; | 126 | return -1; |
127 | } | 127 | } |
128 | state->current_node += new_buffer - state->buffer; | ||
129 | cur += new_buffer - state->buffer; | ||
128 | state->buffer = new_buffer; | 130 | state->buffer = new_buffer; |
129 | } | 131 | } |
130 | 132 | ||
133 | cur[n] = '\0'; | ||
131 | bool redraw = false; | 134 | bool redraw = false; |
132 | while (*cur) { | 135 | while (*cur) { |
133 | if (state->nodes[state->depth] == JSON_NODE_STRING) { | 136 | if (state->nodes[state->depth] == JSON_NODE_STRING) { |