Skip to content

Commit d718bdc

Browse files
committed
fix handling of UnsignedByte
This tweaks the handling of UnsignedByte within the trace generator. Previously, it was not handling signed values correctly.
1 parent 76ae5f6 commit d718bdc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/cmd/generate/class.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ func generateJavaModuleColumnSetter[F any](className string, methodName string,
456456
func generateJavaModuleLegacyColumnSetter(className string, methodName string, builder indentBuilder) {
457457
i1Builder := builder.Indent()
458458
builder.WriteIndentedString("public ", className, " ", methodName, "(final UnsignedByte val) {\n")
459-
i1Builder.WriteIndentedString("return ", methodName, "(val.toByte());\n")
459+
i1Builder.WriteIndentedString("return ", methodName, "(val.toByte()&0xff);\n")
460460
builder.WriteIndentedString("}\n\n")
461461
}
462462

0 commit comments

Comments
 (0)