Fixed incorrect variable in buffer_append_va (thanks, Max!).
authorRyan C. Gordon <icculus@icculus.org>
Mon, 23 Jun 2014 14:50:56 -0400
changeset 1140 fad7ed946c06
parent 1139 8cda6a463824
child 1141 77468a2a9165
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.
mojoshader_common.c
--- a/mojoshader_common.c	Mon Apr 28 14:15:17 2014 -0400
+++ b/mojoshader_common.c	Mon Jun 23 14:50:56 2014 -0400
@@ -799,7 +799,7 @@
     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