Closed UndeadNappist closed 2 years ago
Every call to snprintf overwrites the buffer. You might be looking for snprintf(ENDOF(buf), sizeof(buf) - strlen(buf),
, but even that wouldn't work quite right for this case, because if I'm reading this right, the next time someone sprays you'll have:
Sprayed here, %s^n
Sprayed here, %s^n
%s^n
What is your desired output? Can you test and see if you get that?
Desired output is
Sprayed here,
%s^n
%s^n
Currently just prints
%s^n
%s^n
Works correctly now.
Looks good, thanks!
Removes quotation marks and 'is sprayed here' and replaces it with a single line at the top of the graffiti, supposedly.