Fix minor bugs discovered during alpha test

This commit is contained in:
Dmitrii Okunev
2024-10-24 19:13:50 +01:00
parent 40991af680
commit 014f67aa44
3 changed files with 10 additions and 0 deletions

View File

@@ -24,6 +24,9 @@ func Eval[T any](
}
value := buf.String()
if value == "" {
return result, nil
}
_, err = fmt.Sscanf(value, "%v", &result)
if err != nil {
return result, fmt.Errorf("unable to scan value '%v' into %T: %w", value, result, err)