Fix incorrect used of snprintf()

This commit is contained in:
John Kessenich 2015-07-12 19:39:51 -06:00
parent 68d78fd31e
commit f98ee23415

View File

@ -2545,8 +2545,9 @@ namespace glslang {
void GetSpirvVersion(std::string& version) void GetSpirvVersion(std::string& version)
{ {
char buf[10]; const int bufSize = 10;
snprintf(buf, "0.%d", spv::Version); char buf[bufSize];
snprintf(buf, bufSize, "0.%d", spv::Version);
version = buf; version = buf;
} }