seijikun: Fix new unit-test introduced with #125

This commit is contained in:
Markus Ebner 2024-01-06 03:05:34 +01:00 committed by Gunnar Morling
parent 88c82d3740
commit 093bd35c44

View File

@ -62,10 +62,6 @@ public class CalculateAverage_seijikun {
public StationIdent(byte[] name, int nameHash) {
this.name = name;
// TODO: DEBUG
// if(Arrays.asList(this.name).contains(';')) {
// throw new RuntimeException();
// }
this.nameHash = nameHash;
}
@ -122,7 +118,7 @@ public class CalculateAverage_seijikun {
private StationIdent readStationName() {
final var VECTOR_SPECIES = ByteVector.SPECIES_256;
if (chunkSize - ptr < VECTOR_SPECIES.length()) { // fallback
if (chunkSize - ptr - 100 < VECTOR_SPECIES.length()) { // fallback
int startPtr = ptr;
while (buffer.get(ptr++) != ';') {
}