Skip to content

Commit

Permalink
seijikun: Fix new unit-test introduced with gunnarmorling#125
Browse files Browse the repository at this point in the history
  • Loading branch information
seijikun committed Jan 6, 2024
1 parent d8b300b commit c9e37d5
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ public static class StationIdent {

public StationIdent(byte[] name, int nameHash) {
this.name = name;
// TODO: DEBUG
// if(Arrays.asList(this.name).contains(';')) {
// throw new RuntimeException();
// }
this.nameHash = nameHash;
}

Expand Down Expand Up @@ -122,7 +118,7 @@ public ChunkReader(RandomAccessFile file, long startOffset, long endOffset) {
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++) != ';') {
}
Expand Down

0 comments on commit c9e37d5

Please sign in to comment.