diff options
author | Anas Nashif <anas.nashif@intel.com> | 2012-11-07 06:45:33 -0800 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2012-11-07 06:45:33 -0800 |
commit | 08bea85fa1e2b674bf0e03e17ac206545ae1ff2a (patch) | |
tree | c9a2e753e84df36e16b566b6cfc46afae602ece7 /input.c | |
parent | 6b1acbee2880fddd7d19f296d79f59640dc1f817 (diff) | |
download | readline-08bea85fa1e2b674bf0e03e17ac206545ae1ff2a.tar.gz readline-08bea85fa1e2b674bf0e03e17ac206545ae1ff2a.tar.bz2 readline-08bea85fa1e2b674bf0e03e17ac206545ae1ff2a.zip |
applied patch readline52-007
Diffstat (limited to 'input.c')
-rw-r--r-- | input.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -133,8 +133,11 @@ rl_get_char (key) return (0); *key = ibuffer[pop_index++]; - +#if 0 if (pop_index >= ibuffer_len) +#else + if (pop_index > ibuffer_len) +#endif pop_index = 0; return (1); @@ -250,7 +253,8 @@ rl_gather_tyi () while (chars_avail--) { k = (*rl_getc_function) (rl_instream); - rl_stuff_char (k); + if (rl_stuff_char (k) == 0) + break; /* some problem; no more room */ if (k == NEWLINE || k == RETURN) break; } @@ -373,7 +377,11 @@ rl_stuff_char (key) RL_SETSTATE (RL_STATE_INPUTPENDING); } ibuffer[push_index++] = key; +#if 0 if (push_index >= ibuffer_len) +#else + if (push_index > ibuffer_len) +#endif push_index = 0; return 1; |