Skip to content
Permalink
Browse files
Fixed incorrect variable in buffer_append_va (thanks, Max!).
This bug only affected the heap-allocation path, so buffer appends <= 256
bytes wouldn't trigger the bug, as we did them on the stack.
  • Loading branch information
icculus committed Jun 23, 2014
1 parent 764a110 commit 4bdadc2df2658d5d67dc59da37b923b2084a0c56
Showing with 1 addition and 1 deletion.
  1. +1 −1 mojoshader_common.c
@@ -799,7 +799,7 @@ int buffer_append_va(Buffer *buffer, const char *fmt, va_list va)
va_copy(ap, va);
vsnprintf(buf, len + 1, fmt, ap); // rebuild it.
va_end(ap);
const int retval = buffer_append(buffer, scratch, len);
const int retval = buffer_append(buffer, buf, len);
buffer->f(buf, buffer->d);
return retval;
} // buffer_append_va

0 comments on commit 4bdadc2

Please sign in to comment.