瀏覽代碼

#2349 fix convert type

tags/v0.9.99
Unknwon 8 年之前
父節點
當前提交
c199703e2a
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3
    3
      models/login.go

+ 3
- 3
models/login.go 查看文件

// and handles possible irregular cases. // and handles possible irregular cases.
func Cell2Int64(val xorm.Cell) int64 { func Cell2Int64(val xorm.Cell) int64 {
switch (*val).(type) { 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) return (*val).(int64)
} }

Loading…
取消
儲存