avoid using vsnprintf when possible for SStream_concat() to improve performance. based on the idea of Dang Hoang Vu.
diff --git a/SStream.c b/SStream.c
index d2f1de3..88fe9f6 100644
--- a/SStream.c
+++ b/SStream.c
@@ -4,6 +4,7 @@
#include <stdint.h>
#include <stdarg.h>
#include <stdio.h>
+#include <string.h>
#include "SStream.h"
#include "cs_priv.h"
@@ -14,6 +15,14 @@
ss->buffer[0] = '\0';
}
+void SStream_concat0(SStream *ss, char *s)
+{
+#ifndef CAPSTONE_DIET
+ strcpy(ss->buffer + ss->index, s);
+ ss->index += strlen(s);
+#endif
+}
+
void SStream_concat(SStream *ss, const char *fmt, ...)
{
#ifndef CAPSTONE_DIET