From 96730f80cbc3b2d5aec2967a61f16bb2f02853e6 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Fri, 1 Dec 2023 16:53:21 +0100 Subject: Adds some possible NULL references and small fixes --- fluid/shell_command.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fluid/shell_command.cxx') 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++; -- cgit v1.2.3