Fix another snprintf issue on MSVC 2010

This commit is contained in:
rdb 2015-11-28 18:51:47 +01:00
parent 061e315e01
commit 75caef56aa

View File

@ -429,9 +429,10 @@ rebuild_bitplanes() {
if (glgsg->_use_object_labels) {
// Assign a label for OpenGL to use when displaying debug messages.
if (num_fbos > 1) {
GLchar name[128];
GLsizei len = snprintf(name, 128, "%s[%d]", _name.c_str(), layer);
glgsg->_glObjectLabel(GL_FRAMEBUFFER, _fbo[layer], len, name);
ostringstream strm;
strm << _name << '[' << layer << ']';
string name = strm.str();
glgsg->_glObjectLabel(GL_FRAMEBUFFER, _fbo[layer], name.size(), name.data());
} else {
glgsg->_glObjectLabel(GL_FRAMEBUFFER, _fbo[layer], _name.size(), _name.data());
}