Modified array wich way the cause of a Segfault