readline: Fix history prev when history is empty
We cannot use list_entry() on an empty list. Without history
we have to return an empty line. This fixes a crash when the
cursor up button is pressed and no command has been entered
previously. Broken since:

commit ada160a
Author: Sascha Hauer <s.hauer@pengutronix.de>
Date:   Tue Jul 29 11:54:26 2014 +0200

    readline: reimplement history functions

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reported-by: Teresa Gamez <t.gamez@phytec.de>
1 parent 45615e3 commit d3f4aa52caf716658ebbf62f107f27ad0c78ffe3
@Sascha Hauer Sascha Hauer authored on 1 Sep 2014
Showing 1 changed file
View
lib/readline.c