Commit 47beca83 authored by Matthew Burket's avatar Matthew Burket

fix history cmd

parent b9bbc6c2
Pipeline #328 canceled with stage
......@@ -101,7 +101,7 @@ int main() {
continue;
}
for (int k = historyPos; k >= 0; k--) {
fprintf(stdout, "%2d %s\n", k + 1, historyBuff[i]);
fprintf(stdout, "%2d %s\n", k + 1, historyBuff[k]);
}
storeHist(tokens, &historyPos, historyBuff, numTokens);
free(tokens);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment