More string functions for USB enumeration as a Host.
[goodfet] / client / GoodFETMAXUSB.py
index 2559eb9..8f05d43 100644 (file)
@@ -529,9 +529,12 @@ class GoodFETMAXUSBHost(GoodFETMAXUSB):
         
         if index==0: return "MISSING STRING";
         
-        self.ctl_read(Get_Descriptor_String);
+        status=self.ctl_read(Get_Descriptor_String);
+        if status: return None;
+        
+        #Since we've got a string
         toret="";
-        for c in self.xfrdata:
+        for c in self.xfrdata[2:len(self.xfrdata)]:
             if c>0: toret=toret+chr(c);
         return toret;