Skip to content

Commit

Permalink
use recordLength to avoid offset issues from the new fields in v75
Browse files Browse the repository at this point in the history
  • Loading branch information
JMConnect committed Nov 27, 2023
1 parent 07648cb commit a585447
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/com/ibm/as400/access/list/AspOpenList.java
Original file line number Diff line number Diff line change
Expand Up @@ -425,9 +425,10 @@ protected Object[] formatOutputData(byte[] data, int recordsReturned, int record
CharConverter conv = new CharConverter(system_.getCcsid(), system_);

AspListItem[] aspList = new AspListItem[recordsReturned];
int offset = 0;
int recordOffset = 0;
for (int i = 0; i < recordsReturned; ++i)
{
int offset = recordOffset;
int aspNumber = BinaryConverter.byteArrayToInt(data, offset);
offset += 4;
if (format_ == 1) {
Expand Down Expand Up @@ -622,6 +623,7 @@ protected Object[] formatOutputData(byte[] data, int recordsReturned, int record

aspList[i] = new AspListItem( aspNumber, useIdentification, jobName, jobUserName, jobNumber, threadIdentifier, threadStatus);
}
recordOffset += recordLength;
}

return aspList;
Expand Down

0 comments on commit a585447

Please sign in to comment.