Fix 'terminal history off' crasher 88/19688/1
authorChris Luke <chrisy@flirble.org>
Fri, 17 May 2019 14:17:16 +0000 (10:17 -0400)
committerChris Luke <chrisy@flirble.org>
Fri, 17 May 2019 14:28:34 +0000 (10:28 -0400)
commit5022c6ce34b5215e63a4ea5972ca0ed0fd196ab0
treef66add0066ed37b1e1ac6e81e26dfd130845e2bd
parentd8a34a57b12200000bb42d1c55f1a99a0a473f4b
Fix 'terminal history off' crasher

- 'set terminal history off' or '... limit 0' has an incorrect
  terminal condition and tries to vec_delete one-too-many times
  causing a crash.
- Changing >= to > fixes this.
- In any case, a single vec_delete is more efficient, so do that
  instead.

Change-Id: Ia0db63b6c5c7891d75b302e793b4e4985dd86ebb
Signed-off-by: Chris Luke <chrisy@flirble.org>
src/vlib/unix/cli.c