mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-12-27 07:37:50 +00:00
Merge pull request #5065
ca86ef1b
readline: don't dereference possible NULL pointer (Jethro Grassie)
This commit is contained in:
commit
fbecfc3c8f
1 changed files with 2 additions and 2 deletions
|
@ -114,7 +114,7 @@ int rdln::readline_buffer::sync()
|
|||
int end = 0, point = 0;
|
||||
#endif
|
||||
|
||||
if (rl_end || *rl_prompt)
|
||||
if (rl_end || (rl_prompt && *rl_prompt))
|
||||
{
|
||||
#if RL_READLINE_VERSION >= 0x0700
|
||||
rl_clear_visible_line();
|
||||
|
@ -137,7 +137,7 @@ int rdln::readline_buffer::sync()
|
|||
while ( this->snextc() != EOF );
|
||||
|
||||
#if RL_READLINE_VERSION < 0x0700
|
||||
if (end || *rl_prompt)
|
||||
if (end || (rl_prompt && *rl_prompt))
|
||||
{
|
||||
rl_restore_prompt();
|
||||
rl_line_buffer = line;
|
||||
|
|
Loading…
Reference in a new issue