Commit 612f15b6 authored by Douglas Miles's avatar Douglas Miles Committed by GitHub

Fix for ansi-test SXHASH.8

parent 5f6fc730
......@@ -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