03.01.2017, 11:39
Quote:
I'm not talking about the compiler not detecting them, I'm talking about why the array actually holds that string, even though its length is bigger than the array's size.
|
Did u try to print that string character wise?(a loop till null) Just to verify if that prints something else too or ening up in a infinite loop then its overwriting null terminator.
Edit: Oh yeah its giving infinite loop null is @ the beginning of string (bug confirmed strcat is not setting null terminator to the end after concatenating when size is exceeded) and sometimes even increasing size giving some of the letters (4 and 8 in this case idk why)