Frank Weissenborn / ShoutCastConnector
Revision:
4:a3b7032f0776
Parent:
3:87023c28aff5
Child:
5:36d14584e42f
--- a/ShoutcastConnector.cpp	Thu Jan 13 13:02:20 2011 +0000
+++ b/ShoutcastConnector.cpp	Thu Jan 13 13:32:03 2011 +0000
@@ -217,11 +217,18 @@
                                 int length = -1;
 
                                 for (int i = startindex + 1; i < startindex + 1 + size*16; i++) {
+                                
                                     if (inbuf[i] == '\'') {
                                         if (start == -1)
                                             start = i+1-(startindex+1);
-                                        else
-                                            length = (i - (startindex+1)) - start; //last indexs - first index
+                                        else {
+                                            if(inbuf[i+1] == ';')
+                                                {
+                                                    length = (i - (startindex+1)) - start; //last indexs - first index
+                                                    break;
+                                                }
+                                        }
+                                        
                                     }
 
                                 }