Skip to content

Commit

Permalink
Fix libxmp xmp_set_position pattern jump/break bug
Browse files Browse the repository at this point in the history
  • Loading branch information
AliceLR committed May 24, 2020
1 parent 39f5f97 commit cadf40a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
3 changes: 3 additions & 0 deletions contrib/libxmp/src/control.c
Expand Up @@ -121,6 +121,9 @@ static void set_position(struct context_data *ctx, int pos, int dir)
} else {
p->pos = pos;
}
f->jumpline = 0;
f->jump = -1;
f->pbreak = 0;
}
}
}
Expand Down
@@ -0,0 +1,14 @@
diff --git a/src/control.c b/src/control.c
index 3bffa87c..c38bcc38 100644
--- a/src/control.c
+++ b/src/control.c
@@ -121,6 +121,9 @@ static void set_position(struct context_data *ctx, int pos, int dir)
} else {
p->pos = pos;
}
+ f->jumpline = 0;
+ f->jump = -1;
+ f->pbreak = 0;
}
}
}
3 changes: 3 additions & 0 deletions contrib/patches/libxmp/README
Expand Up @@ -76,6 +76,9 @@ Patch summary
06: Fixes bugs in the MOD loader caused by the depacker removal patch.
This should eventually be merged into patch 02.
07: Removes a non-portable call to fdopen in xmp_load_module_from_file.
Upstream bug report: https://github.com/cmatsuoka/libxmp/issues/167.
08: Makes xmp_set_position clear the pattern break/jump variables consistently.
Penting merge upstream: https://github.com/cmatsuoka/libxmp/pull/169.

10: Fixes https://github.com/cmatsuoka/libxmp/issues/97. This has been merged
upstream in PR https://github.com/cmatsuoka/libxmp/pull/98.
Expand Down
3 changes: 3 additions & 0 deletions docs/changelog.txt
Expand Up @@ -18,6 +18,9 @@ USERS
directive would ignore editor settings. Also added a recursion
limit for includes and fixed a bug where the "include=file"
format would not work on some platforms.
+ Fixed a libxmp bug where pattern jump/break could take effect
after using JUMP MOD ORDER or setting MOD_ORDER/MOD_POSITION.
This fixes a bug at the end of the Inmaportal scene in Cans 3.

DEVELOPERS

Expand Down

0 comments on commit cadf40a

Please sign in to comment.