summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-01-11 15:47:23 +0800
committerUnknwon <u@gogs.io>2016-01-11 15:47:23 +0800
commitc199703e2aa746f10ff2b584513fe3af810b6c1a (patch)
treec87b1ba47ee88b4511d6e139d1e2d55ceb31bc05 /models
parentdb719abff2d645672b686ea69c94683f49340761 (diff)
downloadgitea-c199703e2aa746f10ff2b584513fe3af810b6c1a.tar.gz
gitea-c199703e2aa746f10ff2b584513fe3af810b6c1a.zip
#2349 fix convert type
Diffstat (limited to 'models')
-rw-r--r--models/login.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/models/login.go b/models/login.go
index dc620e1bca..df89050965 100644
--- a/models/login.go
+++ b/models/login.go
@@ -109,9 +109,9 @@ type LoginSource struct {
// and handles possible irregular cases.
func Cell2Int64(val xorm.Cell) int64 {
switch (*val).(type) {
- case []int8:
- log.Trace("Cell2Int64 ([]int8): %v", *val)
- return int64((*val).([]int8)[0])
+ case []uint8:
+ log.Trace("Cell2Int64 ([]uint8): %v", *val)
+ return com.StrTo(string((*val).([]uint8))).MustInt64()
}
return (*val).(int64)
}