summaryrefslogtreecommitdiff
path: root/fluid/shell_command.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2023-12-01 16:53:21 +0100
committerMatthias Melcher <github@matthiasm.com>2023-12-01 16:53:27 +0100
commit96730f80cbc3b2d5aec2967a61f16bb2f02853e6 (patch)
tree2efb7ea0cf9f9f71aa7fa1838bd4b349ff9157d2 /fluid/shell_command.cxx
parentccc21d381a41620a9fb91870ab2a47ef9309d148 (diff)
Adds some possible NULL references and small fixes
Diffstat (limited to 'fluid/shell_command.cxx')
-rw-r--r--fluid/shell_command.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/fluid/shell_command.cxx b/fluid/shell_command.cxx
index 1af872ae0..79b1609e8 100644
--- a/fluid/shell_command.cxx
+++ b/fluid/shell_command.cxx
@@ -795,7 +795,7 @@ void Fd_Shell_Command_List::write(Fd_Project_Writer *out) {
void Fd_Shell_Command_List::add(Fd_Shell_Command *cmd) {
if (list_size == list_capacity) {
list_capacity += 16;
- list = (Fd_Shell_Command**)::realloc(list, list_capacity * sizeof(Fd_Shell_Command**));
+ list = (Fd_Shell_Command**)::realloc(list, list_capacity * sizeof(Fd_Shell_Command*));
}
list[list_size++] = cmd;
}
@@ -809,7 +809,7 @@ void Fd_Shell_Command_List::add(Fd_Shell_Command *cmd) {
void Fd_Shell_Command_List::insert(int index, Fd_Shell_Command *cmd) {
if (list_size == list_capacity) {
list_capacity += 16;
- list = (Fd_Shell_Command**)::realloc(list, list_capacity * sizeof(Fd_Shell_Command**));
+ list = (Fd_Shell_Command**)::realloc(list, list_capacity * sizeof(Fd_Shell_Command*));
}
::memmove(list+index+1, list+index, (list_size-index)*sizeof(Fd_Shell_Command**));
list_size++;