Update yatl.
[awesomized/libmemcached] / libtest / drizzled.cc
index 49fe29699f2843984988d8c8ec56515f8afd41f6..16933c4bdab08e09a0573c5b8b629223e437f0c8 100644 (file)
@@ -34,7 +34,7 @@
  *
  */
 
-#include <config.h>
+#include "libtest/yatlcon.h"
 #include <libtest/common.h>
 
 #include <libtest/drizzled.h>
@@ -182,9 +182,10 @@ public:
   {
     if (arg > 0)
     {
-      char buffer[1024];
-      snprintf(buffer, sizeof(buffer), "--drizzle-protocol.port=%d", int(arg));
-      app.add_option(buffer);
+      libtest::vchar_t buffer;
+      buffer.resize(1024);
+      snprintf(&buffer[1024], buffer.size(), "--drizzle-protocol.port=%d", int(arg));
+      app.add_option(&buffer[1024]);
     }
   }
 
@@ -205,6 +206,11 @@ bool Drizzle::build(size_t argc, const char *argv[])
 
   for (size_t x= 0 ; x < argc ; x++)
   {
+    if (argv[x] == NULL)
+    {
+      break;
+    }
+
     add_option(argv[x]);
   }