kurioes / pmix

Automatically exported from code.google.com/p/pmix
0 stars 0 forks source link

Bug: In playlist swap error #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
There's an error in the JMPDComm code.

In org.a0z.mpd.MPDPlaylist.swap():
    public void swap(int song1Id, int song2Id) throws MPDServerException {
        String[] args = new String[2];
        args[0] = Integer.toString(song1Id);
     -->args[0] = Integer.toString(song2Id);
        this.mpd.getMpdConnection().sendCommand(MPD_CMD_PLAYLIST_SWAP_ID,
args);
        this.refresh();
    }
You create an array of 2 items, and set item one to song2Id, yet the 2nd
entry stays 0. (as you overwrite it).

Original issue reported on code.google.com by mrsnowfl...@gmail.com on 21 Sep 2009 at 2:58

GoogleCodeExporter commented 9 years ago
Thanks for that review. We don't use this code ATM, but I fixed it in trunk 
anyway.

Original comment by stefan.a...@gmail.com on 4 Nov 2009 at 7:47