OSDN Git Service

fix: Now songLimit no longer accepts negative number.
authorhizumiaoba <56146205+hizumiaoba@users.noreply.github.com>
Mon, 11 Oct 2021 08:16:09 +0000 (17:16 +0900)
committerhizumiaoba <56146205+hizumiaoba@users.noreply.github.com>
Mon, 11 Oct 2021 08:16:09 +0000 (17:16 +0900)
src/com/ranfa/lib/Settings.java

index 8ae2442..0f56b08 100644 (file)
@@ -81,7 +81,7 @@ public class Settings {
                } catch (IOException e) {
                        e.printStackTrace();
                }
-               return res < 0 ? 360 : res;
+               return res < 1 ? 360 : res;
        }
 
        public static int getSongsLimit() {
@@ -93,7 +93,7 @@ public class Settings {
                } catch (IOException e) {
                        e.printStackTrace();
                }
-               return res;
+               return res < 1 ? 3 : res;
        }
 
        public static boolean saveScoreLog() {