From 8739c39f080271adfe8c8de79f7523e45c21f6b5 Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 28 Aug 2017 18:33:59 +0100 Subject: [PATCH] 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 --- renderdoc/serialise/utf8printf.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/renderdoc/serialise/utf8printf.cpp b/renderdoc/serialise/utf8printf.cpp index 65e52d1d2..0c1c4cbb6 100644 --- a/renderdoc/serialise/utf8printf.cpp +++ b/renderdoc/serialise/utf8printf.cpp @@ -1127,8 +1127,6 @@ int utf8printf(char *buf, size_t bufsize, const char *fmt, va_list args) size_t actualsize = 0; char *output = buf; char *end = buf ? buf + bufsize - 1 : NULL; - if(end) - *end = 0; const char *iter = fmt;