Skip to content

Commit

Permalink
Fix writing AUTOINCREMENT and LONG fields
Browse files Browse the repository at this point in the history
Fix #120
  • Loading branch information
albfernandez committed Feb 27, 2024
1 parent a4e9057 commit 9661e20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/linuxense/javadbf/DBFWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -479,10 +479,10 @@ private void writeRecord(DataOutput dataOutput, Object[] objectArray) throws IOE
case LONG:
case AUTOINCREMENT:
if (objectArray[j] != null) {
dataOutput.write(DBFUtils.littleEndian(((Number) objectArray[j]).intValue()));
dataOutput.writeInt(DBFUtils.littleEndian(((Number) objectArray[j]).intValue()));
}
else {
dataOutput.write(0);
dataOutput.writeInt(0);
}
break;

Expand Down

0 comments on commit 9661e20

Please sign in to comment.