Fix incorrect used of snprintf()
This commit is contained in:
parent
68d78fd31e
commit
f98ee23415
1 changed files with 3 additions and 2 deletions
|
|
@ -2545,8 +2545,9 @@ namespace glslang {
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue