valery1707 / kaitai-gradle-plugin

Gradle plugin for Kaitai: declarative language to generate binary data parsers
https://kaitai.io/
MIT License
6 stars 4 forks source link

problem with the function readBytesTerm in "ByteBufferKaitaiStream.java" #19

Closed ranitg closed 3 years ago

ranitg commented 3 years ago

Hi,

The line: int c = bb.get(); the function readBytesTerm in "ByteBufferKaitaiStream.java"

This should read into an unsigned int variable.

In the kaitai web IDE the code works as: terminator: 0xfe

but in this project: terminator: -2 (the byte is read as -2 (int) instead of 254 (unsigned int))

This is an inconsistency.

Thanks!

valery1707 commented 3 years ago

but in this project ...

There is no one non-test java file in this project. This project contains only the Gradle plugin which is built java files from .ksy-files (Kaitai Struct format description).

File ByteBufferKaitaiStream.java exists in Kaitai Struct runtime library for Java. Please add the issue in the correct project.