commit | f98ee23415719f4475786b9d6b8419983d28409a | [log] [tgz] |
---|---|---|
author | John Kessenich <cepheus@frii.com> | Sun Jul 12 19:39:51 2015 -0600 |
committer | John Kessenich <cepheus@frii.com> | Sun Jul 12 19:39:51 2015 -0600 |
tree | 526fc9ca33a066f28bb4561000bda28883ae3470 | |
parent | 68d78fd31ef6f19321c91df54a84a9d1d15ddb88 [diff] |
Fix incorrect used of snprintf()
diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index a3b937a..ce37085 100644 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp
@@ -2545,8 +2545,9 @@ void GetSpirvVersion(std::string& version) { - char buf[10]; - snprintf(buf, "0.%d", spv::Version); + const int bufSize = 10; + char buf[bufSize]; + snprintf(buf, bufSize, "0.%d", spv::Version); version = buf; }