Skip to content

Commit fb48177

Browse files
committed
Merge branch 'perf-improvements' of https://github.com/wurstscript/WurstScript into perf-improvements
2 parents f1e094a + 8c88fa7 commit fb48177

File tree

1 file changed

+1
-1
lines changed
  • de.peeeq.wurstscript/src/main/java/de/peeeq/wurstscript/translation/imtranslation

1 file changed

+1
-1
lines changed

de.peeeq.wurstscript/src/main/java/de/peeeq/wurstscript/translation/imtranslation/ImPrinter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ public static void print(ImVarAccess p, Appendable sb, int indent) {
276276
public static String smallHash(Object g) {
277277
int h = g.hashCode();
278278
// avoid negative hashes
279-
h = Math.abs(h);
279+
h = h & Integer.MAX_VALUE;
280280
// take only the last 3 digits
281281
int v = h % 1000;
282282
return Integer.toString(v);

0 commit comments

Comments
 (0)