Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 4bdadc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mojoshader_common.c
Expand Up @@ -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
Expand Down

0 comments on commit 4bdadc2

Please sign in to comment.