mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
time: fix error: array index out of range
This commit is contained in:
parent
abe4898b4a
commit
a99f214a0f
@ -88,6 +88,9 @@ fn calculate_date_from_offset(day_offset_ int) (int, int, int) {
|
|||||||
estimated_month++
|
estimated_month++
|
||||||
}
|
}
|
||||||
for day_offset <= days_before[estimated_month] {
|
for day_offset <= days_before[estimated_month] {
|
||||||
|
if estimated_month == 0 {
|
||||||
|
break
|
||||||
|
}
|
||||||
estimated_month--
|
estimated_month--
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user