Skip to content

Commit 8bec6b3

Browse files
committed
Fix serialising of Prism command_line parsing option
1 parent eb5d598 commit 8bec6b3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/yarp/java/org/prism/ParsingOptions.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ public byte getValue() {
2929
/**
3030
* The command line options that can be passed to the parser.
3131
* See PM_OPTIONS_COMMAND_LINE_* in include/prism/options.h.
32+
*
33+
* NOTE: positions should match PM_OPTIONS_COMMAND_LINE_* constants values
3234
*/
3335
public enum CommandLine { A, E, L, N, P, X };
3436

@@ -94,7 +96,7 @@ private static void write(ByteArrayOutputStream output, byte[] bytes) {
9496
private static <T extends Enum<T>> byte serializeEnumSet(EnumSet<T> set) {
9597
byte result = 0;
9698
for (T value : set) {
97-
result |= 1 << (value.ordinal() + 1);
99+
result |= 1 << value.ordinal();
98100
}
99101
return result;
100102
}

0 commit comments

Comments
 (0)