File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -232,8 +232,8 @@ func (maybeSelf MaybeDef) ToInt32() (int32, error) {
232232 default :
233233 return int32 (0 ), errors .New ("unsupported" )
234234 case string :
235- val , err := maybeSelf . ToInt64 ( )
236- return int32 (val ), err
235+ parseInt , err := strconv . ParseInt (( ref ).( string ), 10 , 32 )
236+ return int32 (parseInt ), err
237237 case bool :
238238 val , err := maybeSelf .ToBool ()
239239 if val {
@@ -274,7 +274,7 @@ func (maybeSelf MaybeDef) ToInt64() (int64, error) {
274274 default :
275275 return int64 (0 ), errors .New ("unsupported" )
276276 case string :
277- return strconv .ParseInt (maybeSelf . ToString ( ), 10 , 32 )
277+ return strconv .ParseInt (( ref ).( string ), 10 , 64 )
278278 case bool :
279279 val , err := maybeSelf .ToBool ()
280280 if val {
You can’t perform that action at this time.
0 commit comments