Commit 65b28c3a authored by easye's avatar easye Committed by GitHub

Merge pull request #1 from TeamSPoon/master

Fix for ansi-test SXHASH.8
parents abcdfddf 612f15b6
......@@ -416,6 +416,7 @@ public final class SimpleString extends AbstractString
@Override
public int sxhash()
{
if(capacity == 0) return 0;
int hashCode = randomStringHashBase;
for (int i = 0; i < capacity; i++) {
hashCode += chars[i];
......@@ -432,6 +433,7 @@ public final class SimpleString extends AbstractString
@Override
public int psxhash()
{
if(capacity == 0) return 0;
int hashCode = randomStringHashBase;
for (int i = 0; i < capacity; i++) {
hashCode += Character.toUpperCase(chars[i]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment