Skip to content

Commit

Permalink
fix(decode): solve int overflow on unix arm32
Browse files Browse the repository at this point in the history
  • Loading branch information
JanDeDobbeleer committed Mar 17, 2023
1 parent 7c722fb commit 4befa91
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func (d *Decoder) addHeadOrLineCommentToMap(node ast.Node) {
}
texts := []string{}
targetLine := node.GetToken().Position.Line
minCommentLine := math.MaxInt64
minCommentLine := math.MaxInt
for _, comment := range commentGroup.Comments {
if minCommentLine > comment.Token.Position.Line {
minCommentLine = comment.Token.Position.Line
Expand Down
2 changes: 1 addition & 1 deletion scanner/scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func (s *Scanner) newLineCount(src []rune) int {
}

func (s *Scanner) updateIndentState(ctx *Context) {
indentNumBasedIndentState := s.indentState
var indentNumBasedIndentState IndentState
if s.prevIndentNum < s.indentNum {
s.indentLevel = s.prevIndentLevel + 1
indentNumBasedIndentState = IndentStateUp
Expand Down

0 comments on commit 4befa91

Please sign in to comment.