]> cgit.babelmonkeys.de Git - mpdbot.git/blobdiff - src/MPDConnection.m
Adapt to ObjFW changes
[mpdbot.git] / src / MPDConnection.m
index 8c610aa2d58f0e203cc8dd1cebb9a2eba082aefc..be46f5cd5d7e37a8279fd7adf990ef7be0d17ece 100644 (file)
                index = [answer indexOfFirstOccurrenceOfString: @":"];
                if (index == OF_INVALID_INDEX)
                        continue;
-               [response setObject: [answer substringFromIndex: index + 2
-                                                       toIndex: answer.length]
-                            forKey: [answer substringFromIndex: 0
-                                                       toIndex: index]];
+               [response setObject: [answer substringWithRange:
+                   of_range(index + 2, answer.length - (index + 2))]
+                            forKey: [answer
+                   substringWithRange: of_range(0, index)]];
        }
 
        return response;