Skip to content

Commit 8739c39

Browse files
committed
Don't write a NULL terminator at the end of the buffer
* Note: we do write a NULL terminator after the data (even if it's truncated) we just don't want to write it at the end of the buffer too
1 parent 9f1e830 commit 8739c39

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

renderdoc/serialise/utf8printf.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,8 +1127,6 @@ int utf8printf(char *buf, size_t bufsize, const char *fmt, va_list args)
11271127
size_t actualsize = 0;
11281128
char *output = buf;
11291129
char *end = buf ? buf + bufsize - 1 : NULL;
1130-
if(end)
1131-
*end = 0;
11321130

11331131
const char *iter = fmt;
11341132

0 commit comments

Comments
 (0)