sync: If step is undefined, use the default value

This commit is contained in:
nemunaire 2024-01-20 12:02:32 +01:00
parent e3762ffb1d
commit b93c57f704

View file

@ -332,6 +332,10 @@ func buildExerciceFlag(i Importer, exercice *fic.Exercice, flag ExerciceFlag, nl
if rns, err := flag.RawNumber(); err != nil {
errs = multierr.Append(errs, NewFlagError(exercice, &flag, nline+1, fmt.Errorf("raw %w", err)))
} else {
if fstep == 0 {
fstep = 1.0
}
for _, rn := range rns {
v := math.Abs(rn) / fstep
if float64(int(v)) != v {