Skip to content

Commit

Permalink
fix(chrome): transition integer overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhirin committed May 19, 2021
1 parent abbf87b commit e06b38f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions imports/chrome/visits.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const (
type VisitAlias Visit
type SourceVisit struct {
VisitAlias
Transition int
Transition int64
}

func (p *chrome) importVisits(db *gorm.DB) error {
Expand Down Expand Up @@ -118,7 +118,7 @@ func (p *chrome) saveVisits(sourceVisits []SourceVisit) error {
return nil
}

func transitionInfoBySourceValue(transition int) (tt TransitionType, tqt TransitionQualifierType, isRedirect bool) {
func transitionInfoBySourceValue(transition int64) (tt TransitionType, tqt TransitionQualifierType, isRedirect bool) {
switch transition & 0xFF {
case 0:
tt = TransitionLink
Expand Down

0 comments on commit e06b38f

Please sign in to comment.