reapack

Package manager for REAPER
Log | Files | Refs | Submodules | README | LICENSE

commit 05943a82ffd38775cb41f435806e2e56db1ebdf0
parent 2db858afebc534335242ac2a4d569458aeb69da1
Author: cfillion <cfillion@users.noreply.github.com>
Date:   Mon, 25 Jan 2016 02:30:36 -0500

oops, ensure strings are always null-terminated on windows

_snwprintf doesn't append a null byte if len >= count
see https://msdn.microsoft.com/en-us/library/2ts7cx93.aspx

Diffstat:
Msrc/encoding.hpp | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/encoding.hpp b/src/encoding.hpp @@ -32,7 +32,7 @@ typedef std::wstring auto_string; #define AUTO_STR(text) L##text #define to_autostring std::to_wstring -#define auto_snprintf _snwprintf +#define auto_snprintf(buf, size, ...) _snwprintf(buf, size - 1, __VA_ARGS__) auto_string make_autostring(const std::string &); std::string from_autostring(const auto_string &);