[CMD] Fix Coverity #715934 "Copy-paste error" (#1040)
authorPako Smith <pakosmth@gmail.com>
Thu, 15 Nov 2018 10:57:41 +0000 (13:57 +0300)
committerHermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
Thu, 15 Nov 2018 10:57:41 +0000 (11:57 +0100)
Fix linked-list pointer comparison.

base/shell/cmd/history.c

index e6676a7..3c709a7 100644 (file)
@@ -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;