summaryrefslogtreecommitdiff
path: root/com32/hdt/hdt-cli.h
diff options
context:
space:
mode:
authorErwan Velu <erwan.velu@free.fr>2009-11-25 22:35:04 +0100
committerErwan Velu <erwan.velu@free.fr>2009-12-04 10:11:13 +0100
commit0d4242b4410c708004d743243555b62680a69acd (patch)
treef366d3a0845cac6099d9a533bbc0a8b6537fd671 /com32/hdt/hdt-cli.h
parentaae5483d9ebd6f091aa740108ad7f2958303931f (diff)
downloadsyslinux-0d4242b4410c708004d743243555b62680a69acd.tar.gz
hdt: reworking history to prevent corruption
Impact: avoid history corruption No need to copy history to input. We can directly use the history stack.
Diffstat (limited to 'com32/hdt/hdt-cli.h')
-rw-r--r--com32/hdt/hdt-cli.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/com32/hdt/hdt-cli.h b/com32/hdt/hdt-cli.h
index 7a254eef..12e71274 100644
--- a/com32/hdt/hdt-cli.h
+++ b/com32/hdt/hdt-cli.h
@@ -87,10 +87,10 @@ typedef enum {
#define PROMPT_SIZE 32
#define MAX_HISTORY_SIZE 32
+#define INPUT hdt_cli.history[hdt_cli.history_pos]
struct s_cli {
cli_mode_t mode;
char prompt[PROMPT_SIZE];
- char input[MAX_LINE_SIZE];
uint8_t cursor_pos;
char history[MAX_HISTORY_SIZE][MAX_LINE_SIZE];
int history_pos;