1
0
mirror of synced 2026-02-04 20:18:00 +08:00

修复值月九星数组下标越界的问题。

This commit is contained in:
6tail
2020-10-17 20:03:01 +08:00
parent 0d1f64664e
commit e06c7a0532

View File

@@ -1903,8 +1903,11 @@ public class Lunar{
}
// 寅月起,所以需要-2
int monthIndex = monthZhiIndex-2;
if(monthIndex<0){
monthIndex += 12;
}
int index = start-monthIndex-1;
if(index<0){
while(index<0){
index += 9;
}
return new NineStar(index);