Fix: dSprintf should receive size of the buffer, not the size of the pointer.

It was safe, as we are using static console return buffer,
which is large enough to hold enough data (default is 2048).
This commit is contained in:
bank 2014-05-01 13:11:21 +04:00
parent c7a5a12080
commit 68b12981ae
2 changed files with 2 additions and 2 deletions

View file

@ -79,7 +79,7 @@ ConsoleMethod(DbgFileView, getCurrentLine, const char *, 2, 2, "()"
S32 lineNum;
const char *file = object->getCurrentLine(lineNum);
char* ret = Con::getReturnBuffer(256);
dSprintf(ret, sizeof(ret), "%s\t%d", file, lineNum);
dSprintf(ret, 256, "%s\t%d", file, lineNum);
return ret;
}