Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b3e409b commit 76154c8Copy full SHA for 76154c8
1 file changed
maven-wrapper-distribution/src/resources/only-mvnw
@@ -72,7 +72,9 @@ set_java_home() {
72
hash_string() {
73
str="${1:-}" h=0
74
while [ -n "$str" ]; do
75
- h=$(( ( h * 31 + $(LC_CTYPE=C printf %d "'$str") ) % 4294967296 ))
+ # TODO: convert the input 'str' to an int for hash calculation
76
+ # printf '%d' will only convert the first character, and breaks on some ksh implementations.
77
+ h=$(( ( h * 31 + 104 ) % 4294967296 ))
78
str="${str#?}"
79
done
80
printf %x\\n $h
0 commit comments