Hi Bram,
2016/6/8 Wed 5:16:40 UTC+9 Bram Moolenaar wrote:
> Patch 7.4.1906
> Problem: Collapsing channel buffers and searching for NL does not work
> properly. (Xavier de Gary, Ramel Eshed)
> Solution: Do not assume the buffer contains a NUL or not. Change NUL bytes
> to NL to avoid the string is truncated.
> Files: src/channel.c, src/netbeans.c, src/proto/channel.pro
> --- 419,432 ----
> own_node = FALSE;
>
> /* now, parse and execute the commands */
> ! nb_parse_cmd(node->rq_buffer);
>
> if (own_node)
> /* buffer finished, dispose of it */
> ! vim_free(node->rq_buffer);
> else
> /* more follows, move it to the start */
> ! channel_consume(nb_channel, PART_SOCK, (int)(p - buffer));
VC10 warns that the variable buffer is uninitialized.
I think this should be node->rq_buffer.
Please check the attached patch.
Regards,
Ken Takata
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
# HG changeset patch
# Parent 92d778867760e0bd8e86e0dc991c52465f431a0b
diff --git a/src/netbeans.c b/src/netbeans.c
--- a/src/netbeans.c
+++ b/src/netbeans.c
@@ -383,7 +383,6 @@ handle_key_queue(void)
netbeans_parse_messages(void)
{
readq_T *node;
- char_u *buffer;
char_u *p;
int own_node;
@@ -426,7 +425,8 @@ netbeans_parse_messages(void)
vim_free(node->rq_buffer);
else
/* more follows, move it to the start */
- channel_consume(nb_channel, PART_SOCK, (int)(p - buffer));
+ channel_consume(nb_channel, PART_SOCK,
+ (int)(p - node->rq_buffer));
}
}
}