From 8a5920c803b4d9ed6b98ededffb5942efbf607bc Mon Sep 17 00:00:00 2001 From: w1z7ard Date: Mon, 29 Aug 2011 01:33:29 +0000 Subject: [PATCH] copy null string terminator. git-svn-id: https://projectm.svn.sourceforge.net/svnroot/projectm/trunk@1359 6778bc44-b910-0410-a7a0-be141de4315d --- src/libprojectM/MilkdropPresetFactory/Parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libprojectM/MilkdropPresetFactory/Parser.cpp b/src/libprojectM/MilkdropPresetFactory/Parser.cpp index ef77d7d78..e685ea79a 100755 --- a/src/libprojectM/MilkdropPresetFactory/Parser.cpp +++ b/src/libprojectM/MilkdropPresetFactory/Parser.cpp @@ -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)