Fix incorrect used of snprintf()
This commit is contained in:
parent
68d78fd31e
commit
f98ee23415
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user