diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2022-04-06 13:37:32 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2022-04-06 13:37:32 -0400 |
| commit | b42a7a18538d9f3c7871b38602728f9d39251514 (patch) | |
| tree | cf613e8d52539976d30cf78ce61792c3de6723b2 /bb.c | |
| parent | db7c5f670fef22b70c7a9978db08e6ee146ff4b5 (diff) | |
Bugfix for bindings error
Diffstat (limited to 'bb.c')
| -rw-r--r-- | bb.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -684,7 +684,8 @@ static void run_bbcmd(bb_t *bb, const char *cmd) if (b->key == keyval) { delete((char**)&b->description); delete((char**)&b->script); - memmove(b, b+1, (size_t)(&bindings[LEN(bindings)] - (b+1))); + int i = (int)(b - bindings); + memmove(&bindings[i], &bindings[i+1], sizeof(binding_t)*(LEN(bindings) - i - 1)); memset(&bindings[LEN(bindings)-1], 0, sizeof(binding_t)); } } |
