copy null string terminator.

git-svn-id: https://projectm.svn.sourceforge.net/svnroot/projectm/trunk@1359 6778bc44-b910-0410-a7a0-be141de4315d
This commit is contained in:
w1z7ard
2011-08-29 01:33:29 +00:00
parent a353959f6b
commit 8a5920c803

View File

@ -2294,7 +2294,7 @@ int Parser::parse_wave_helper(std::istream & fs, MilkdropPreset * preset, int
/// HACK the parse_line code already parsed the per_pixel variable name. This handles that case
/// Parser needs reworked. Don't have time for it. So this is the result.
if (init_string)
strncpy(string, init_string, strlen(init_string));
strncpy(string, init_string, strlen(init_string)+1);
else
{
if (parseToken(fs, string) != tEq)