Skip to content

Commit

Permalink
fix align method in linked program
Browse files Browse the repository at this point in the history
Former-commit-id: 0637d4e
  • Loading branch information
andrescv committed Sep 3, 2019
1 parent 48f53e5 commit 3b9296f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/jupiter/linker/LinkedProgram.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ protected void add(byte b) {

/** Aligns static data segment to a word boundary. */
protected void align() {
for (int i = 0; i < Data.offsetToWordAlign(data.size()); i++) {
int offset = Data.offsetToWordAlign(data.size());
for (int i = 0; i < offset; i++) {
data.add((byte) 0);
}
}
Expand Down

0 comments on commit 3b9296f

Please sign in to comment.