diff options
-rw-r--r-- | bcmdhd/wifi_hal/common.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bcmdhd/wifi_hal/common.cpp b/bcmdhd/wifi_hal/common.cpp index 9182114..fc81d61 100644 --- a/bcmdhd/wifi_hal/common.cpp +++ b/bcmdhd/wifi_hal/common.cpp @@ -213,7 +213,7 @@ void wifi_unregister_cmd(wifi_handle handle, WifiCommand *cmd) for (int i = 0; i < info->num_cmd; i++) { if (info->cmd[i].cmd == cmd) { int id = info->cmd[i].id; - memmove(&info->cmd[i], &info->cmd[i+1], (info->num_cmd - i) * sizeof(cmd_info)); + memmove(&info->cmd[i], &info->cmd[i+1], (info->num_cmd - i - 1) * sizeof(cmd_info)); info->num_cmd--; ALOGV("Successfully removed command %d: %p from %d", id, cmd, i); break; |