$ git clone http://tcclient.ion.nu/tc_client.git
commit 0b8efdf41124002ad1713e5202f7a9a483f6af24
Author: Alicia <...>
Date:   Sat Jun 13 18:21:13 2015 +0200

    tc_client-gtk: fixed windows compatibility (w32_runcmd and strndup)

diff --git a/ChangeLog b/ChangeLog
index 94111d0..2c816c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,5 @@
+0.34:
+tc_client-gtk: fixed windows compatibility (w32_runcmd and strndup)
 0.33:
 Fixed the /forgive command (by name) which would previously fail unless the target was found in the first 'banlist' AMF0 packet.
 Added a /version remote command to give the client name and version number, making /userinfo conform to the flash client's behaviour instead, and send the response with the two separate privacy field options 'n' and 'b'.
diff --git a/Makefile b/Makefile
index 8abfff1..5588e9c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-VERSION=0.33
+VERSION=0.34pre
 CFLAGS=-g3 -Wall $(shell curl-config --cflags)
 LIBS=-g3 $(shell curl-config --libs)
 PREFIX=/usr/local
diff --git a/utilities/gtk/camviewer.c b/utilities/gtk/camviewer.c
index c95ba35..ac1ba7d 100644
--- a/utilities/gtk/camviewer.c
+++ b/utilities/gtk/camviewer.c
@@ -317,7 +317,9 @@ gboolean handledata(GIOChannel* iochannel, GIOCondition condition, gpointer data
         {
           memmove(space, msg, strlen(msg)+1);
           char* end=strchr(nick, ':');
-          pm=strndup(nick, end-nick);
+          pm=malloc(end-nick+1);
+          memcpy(pm, nick, end-nick);
+          pm[end-nick]=0;
         }
       }
     }
@@ -798,7 +800,9 @@ void sendmessage(GtkEntry* entry, struct viddata* data)
     const char* end=strchr(&msg[5], ' ');
     if(end)
     {
-      pm=strndup(&msg[5], end-&msg[5]);
+      pm=malloc(end-&msg[5]+1);
+      memcpy(pm, &msg[5], end-&msg[5]);
+      pm[end-&msg[5]]=0;
       struct user* user=finduser(pm);
       if(!user)
       {
diff --git a/utilities/gtk/compat.h b/utilities/gtk/compat.h
index 9028da5..3bce725 100644
--- a/utilities/gtk/compat.h
+++ b/utilities/gtk/compat.h
@@ -19,7 +19,7 @@
 extern SECURITY_ATTRIBUTES sa;
 #define w32_runcmd(cmd) \
   { \
-    char* arg=strchr(cmd,''); \
+    char* arg=strchr(cmd,' '); \
     if(arg){arg[0]=0; arg=&arg[1];} \
     ShellExecute(0, "open", cmd, arg, 0, SW_SHOWNORMAL); \
   }