diff --git a/base/shell/cmd/history.c b/base/shell/cmd/history.c index e6676a7ffdd..3c709a7ecf0 100644 --- a/base/shell/cmd/history.c +++ b/base/shell/cmd/history.c @@ -309,7 +309,7 @@ LPCTSTR PeekHistory(INT dir) else { /* key down */ - if (entry->next == Bottom || entry == Bottom) + if (entry->prev == Bottom || entry == Bottom) { #ifdef WRAP_HISTORY entry = Top;