Skip to content

Commit

Permalink
U main.go: fix slice out of range
Browse files Browse the repository at this point in the history
  • Loading branch information
yurenchen000 committed Nov 4, 2024
1 parent d71c084 commit 0c931ba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server-go/cloud-clip/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,12 @@ func show_bin_info() string {
break
}
}

if len(gitHash) > 7 {
gitHash = gitHash[:7]
}
}

gitHash = gitHash[:7]
// fmt.Println("== cloud-clip: ", server_version)
fmt.Printf("== \033[07m cloud-clip \033[36m %s \033[0m \033[35m %s %s %s\033[0m\n",
server_version, gitHash, buildInfo.GoVersion, buildInfo.Main.Version)
Expand Down

0 comments on commit 0c931ba

Please sign in to comment.