sizeof(&palettes_names) only works currently by coincidence. On 64-bit systems the size of a pointer is 8, minus 1 is 7 which is the current number of palettes.
This divides the total size of the entire array by the size of each element, which is the idiomatic way to find "number of elements of initialized array" in C.
sizeof(&palettes_names) only works currently by coincidence. On 64-bit systems the size of a pointer is 8, minus 1 is 7 which is the current number of palettes.
This divides the total size of the entire array by the size of each element, which is the idiomatic way to find "number of elements of initialized array" in C.