From 19e101acd3a80af1c055c15d82961fe588b58613 Mon Sep 17 00:00:00 2001 From: Raphael Roberts Date: Thu, 31 Oct 2019 22:16:19 -0500 Subject: [PATCH] Switched the while loop for a for loop since we are not making modifications --- SongList.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SongList.java b/SongList.java index 02e6d02..c984498 100644 --- a/SongList.java +++ b/SongList.java @@ -91,7 +91,7 @@ public class SongList { new_list.add(artist, current.getTitle()); return new_list; } - while (current.getLink() != m_last) { + for (int i = 0; i < size(); i++) { if (current.getArtist().compareTo(artist) == 0) new_list.add(artist, current.getTitle()); current = current.getLink();