mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-26 06:39:43 +03:00
in unget_kbinput(), free s after the wctomb() call, since we don't need
it after that git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2143 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
15dbc6ef07
commit
c109549a7e
@ -57,6 +57,9 @@ CVS code -
|
|||||||
- For consistency, preserve placewewant if we didn't unjustify
|
- For consistency, preserve placewewant if we didn't unjustify
|
||||||
instead of setting it to 0. (DLR)
|
instead of setting it to 0. (DLR)
|
||||||
- winio.c:
|
- winio.c:
|
||||||
|
unget_kbinput()
|
||||||
|
- Free s after the wctomb() call, since we don't need it after
|
||||||
|
that. (DLR)
|
||||||
get_kbinput(), get_translated_kbinput(), get_ascii_kbinput(),
|
get_kbinput(), get_translated_kbinput(), get_ascii_kbinput(),
|
||||||
get_untranslated_kbinput()
|
get_untranslated_kbinput()
|
||||||
- Make the ascii_digits variables ints instead of size_t's,
|
- Make the ascii_digits variables ints instead of size_t's,
|
||||||
|
@ -125,6 +125,7 @@ void unget_kbinput(int kbinput, bool meta_key, bool func_key)
|
|||||||
wchar_t wc = (wchar_t)kbinput;
|
wchar_t wc = (wchar_t)kbinput;
|
||||||
|
|
||||||
i = wctomb(s, wc);
|
i = wctomb(s, wc);
|
||||||
|
free(s);
|
||||||
|
|
||||||
if (i == -1)
|
if (i == -1)
|
||||||
/* This wide character is unrecognized. Send it back. */
|
/* This wide character is unrecognized. Send it back. */
|
||||||
@ -133,7 +134,6 @@ void unget_kbinput(int kbinput, bool meta_key, bool func_key)
|
|||||||
for (; i > 0; i--)
|
for (; i > 0; i--)
|
||||||
ungetch(s[i - 1]);
|
ungetch(s[i - 1]);
|
||||||
}
|
}
|
||||||
free(s);
|
|
||||||
} else
|
} else
|
||||||
ungetch(kbinput);
|
ungetch(kbinput);
|
||||||
if (meta_key)
|
if (meta_key)
|
||||||
|
Loading…
Reference in New Issue
Block a user