diff options
author | David Walter Seikel | 2014-01-31 14:40:51 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-01-31 14:40:51 +1000 |
commit | 02a0232a881796c57cf68bf3575cd6f76b7db168 (patch) | |
tree | 0a411975aaf422b7e0ad33c43238a6adb8897fbc | |
parent | More gratuitous name changes. (diff) | |
download | boxes-02a0232a881796c57cf68bf3575cd6f76b7db168.zip boxes-02a0232a881796c57cf68bf3575cd6f76b7db168.tar.gz boxes-02a0232a881796c57cf68bf3575cd6f76b7db168.tar.bz2 boxes-02a0232a881796c57cf68bf3575cd6f76b7db168.tar.xz |
Another null terminated array removal.
-rw-r--r-- | dumbsh.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -168,8 +168,7 @@ static struct keyCommand simpleEmacsKeys[] = | |||
168 | {"Home", startOfLine}, | 168 | {"Home", startOfLine}, |
169 | {"^A", startOfLine}, | 169 | {"^A", startOfLine}, |
170 | {"Up", prevHistory}, | 170 | {"Up", prevHistory}, |
171 | {"^P", prevHistory}, | 171 | {"^P", prevHistory} |
172 | {NULL, NULL} | ||
173 | }; | 172 | }; |
174 | 173 | ||
175 | static int handleKeySequence(long extra, char *sequence) | 174 | static int handleKeySequence(long extra, char *sequence) |
@@ -177,7 +176,7 @@ static int handleKeySequence(long extra, char *sequence) | |||
177 | int j; | 176 | int j; |
178 | 177 | ||
179 | // Search for a key sequence bound to a command. | 178 | // Search for a key sequence bound to a command. |
180 | for (j = 0; simpleEmacsKeys[j].key; j++) | 179 | for (j = 0; j < (sizeof(simpleEmacsKeys) / sizeof(*simpleEmacsKeys)); j++) |
181 | { | 180 | { |
182 | if (strcmp(simpleEmacsKeys[j].key, sequence) == 0) | 181 | if (strcmp(simpleEmacsKeys[j].key, sequence) == 0) |
183 | { | 182 | { |