open-dis/dis-tutorial

Index Exception PduTypeDIS7 Line 118

Updownquark opened this issue · 4 comments

The DIS 7 version of the PduType enum appears to be a modified copy-paste of the Dis 6 version. Though new PDU type enums have been added, the lookup array initialization is initialized on line 109 with a length corresponding to the DIS 6 version (68). When the enums with indexes beyond that are added by the static initializer on line , an index exception occurs.

@Updownquark It's been a while, but was this comment in relation to a page in the tutorial here or in one of the language implementations in anothere repository? e.g. https://github.com/open-dis/open-dis-java

Haha, oops, sorry for putting this in the wrong repo. That's almost the file, the DIS 7 one is https://github.com/open-dis/dis-enumerations/blob/44d66b9a57963e50953f7553daab8a9a80be226d/src/main/java/edu/nps/moves/disenum/PduTypeDIS7.java#L109

I fixed it there the same day I wrote this, so we can close or delete this.

Perfect! And thank-you for helping me close the loop! Cheers