forked from aniani/vim
patch 7.4.1439
Problem: Using uninitialzed variable. Solution: Initialize vc_type.
This commit is contained in:
@@ -83,12 +83,15 @@ write_string(garray_T *gap, char_u *str)
|
|||||||
vimconv_T conv;
|
vimconv_T conv;
|
||||||
char_u *converted = NULL;
|
char_u *converted = NULL;
|
||||||
|
|
||||||
|
if (!enc_utf8)
|
||||||
|
{
|
||||||
|
conv.vc_type = CONV_NONE;
|
||||||
convert_setup(&conv, p_enc, (char_u*)"utf-8");
|
convert_setup(&conv, p_enc, (char_u*)"utf-8");
|
||||||
if (conv.vc_type != CONV_NONE)
|
if (conv.vc_type != CONV_NONE)
|
||||||
converted = res = string_convert(&conv, res, NULL);
|
converted = res = string_convert(&conv, res, NULL);
|
||||||
convert_setup(&conv, NULL, NULL);
|
convert_setup(&conv, NULL, NULL);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ga_append(gap, '"');
|
ga_append(gap, '"');
|
||||||
while (*res != NUL)
|
while (*res != NUL)
|
||||||
{
|
{
|
||||||
@@ -540,10 +543,14 @@ json_decode_string(js_read_T *reader, typval_T *res)
|
|||||||
|
|
||||||
p = reader->js_buf + reader->js_used + 1; /* skip over " */
|
p = reader->js_buf + reader->js_used + 1; /* skip over " */
|
||||||
#if defined(FEAT_MBYTE) && defined(USE_ICONV)
|
#if defined(FEAT_MBYTE) && defined(USE_ICONV)
|
||||||
|
if (!enc_utf8)
|
||||||
|
{
|
||||||
|
conv.vc_type = CONV_NONE;
|
||||||
convert_setup(&conv, (char_u*)"utf-8", p_enc);
|
convert_setup(&conv, (char_u*)"utf-8", p_enc);
|
||||||
if (conv.vc_type != CONV_NONE)
|
if (conv.vc_type != CONV_NONE)
|
||||||
converted = p = string_convert(&conv, p, NULL);
|
converted = p = string_convert(&conv, p, NULL);
|
||||||
convert_setup(&conv, NULL, NULL);
|
convert_setup(&conv, NULL, NULL);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
while (*p != '"')
|
while (*p != '"')
|
||||||
{
|
{
|
||||||
|
@@ -743,6 +743,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1439,
|
||||||
/**/
|
/**/
|
||||||
1438,
|
1438,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user