fix app crash
This commit is contained in:
@@ -237,17 +237,19 @@ class Parsing {
|
||||
} else {
|
||||
auxSubjects.add(subjects[i])
|
||||
|
||||
var previous = auxSubjects[auxSubjects.size - 1].number.toInt() + 1
|
||||
val next = subjects[i + 1].number.toInt()
|
||||
while (previous < next) {
|
||||
auxSubjects.add(
|
||||
Subject.freeSubject(
|
||||
previous.toString(),
|
||||
subjects[i-1].end,
|
||||
subjects[i+1].start
|
||||
if (auxSubjects[auxSubjects.size - 1].number.toIntOrNull() != null) {
|
||||
var previous = auxSubjects[auxSubjects.size - 1].number.toInt() + 1
|
||||
val next = subjects[i + 1].number.toInt()
|
||||
while (previous < next) {
|
||||
auxSubjects.add(
|
||||
Subject.freeSubject(
|
||||
previous.toString(),
|
||||
subjects[i-1].end,
|
||||
subjects[i+1].start
|
||||
)
|
||||
)
|
||||
)
|
||||
previous += 1
|
||||
previous += 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -352,4 +354,4 @@ class Parsing {
|
||||
return marks
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user