From d017c3ef77548a74c221cd109f9662a0282d4b23 Mon Sep 17 00:00:00 2001 From: Yannick Brenning <90418998+ybrenning@users.noreply.github.com> Date: Fri, 14 Jan 2022 21:04:55 +0100 Subject: [PATCH] fix: update value at index and return `SUCCESS` (#932) (#933) --- data_structures/array/carray.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/data_structures/array/carray.c b/data_structures/array/carray.c index 4d75ed54..58840f41 100644 --- a/data_structures/array/carray.c +++ b/data_structures/array/carray.c @@ -100,6 +100,8 @@ int updateValueCArray(CArray *array, int position, int value) { if (array->array[position] != 0) { + array->array[position] = value; + return SUCCESS; } else