summaryrefslogtreecommitdiff
path: root/reflect.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-17 21:05:52 -0600
committerJeff Carr <[email protected]>2024-01-17 21:05:52 -0600
commitd91e80a9eabf79cc376c725aaf3a877856faa6b9 (patch)
treeda31050456b7c6f53de8e8a5748f94ee85343605 /reflect.go
parent38595e75f2f35ecce9cc6a8d887f393d34975957 (diff)
works with new toolkit and gui changesv1.1.4
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'reflect.go')
-rw-r--r--reflect.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/reflect.go b/reflect.go
index 6336b2b..c2d301a 100644
--- a/reflect.go
+++ b/reflect.go
@@ -106,7 +106,10 @@ func GetInt(A any) int {
return A.(int)
case reflect.String:
tmp := A.(string)
- i, _ := strconv.Atoi(tmp)
+ i, err := strconv.Atoi(tmp)
+ if err != nil {
+ return -1
+ }
return i
case reflect.Bool:
if A.(bool) {