Does this happen without any OXPs present? This entire method was created to allow merging of array items, in the same way dictionary items are merged. The only use so far with the core game is equipment.plist, where this method will allow overriding default equipment with user defined equipment. The problem is that I did not take into account the possibility of other arrays (oxp ones maybe) being unintentionally merged (duh!). Obviously, if your array has two items and I am trying to lookup the third, it will crash. I'll have to come up with a more appropriate way to check against lookup index, I think. Thanks for reporting this.
I have changed a bit the code to target equipment.plist only, which was the original intention. It's not very pretty, but it should do the job, at least for now. The way the equipment.plist is structured (an array of arrays) makes it pretty unique in its handling when it comes to merging external oxp equipment.plists. At least now, other arrays should be totally unaffected and not give crashes like the one reported. Any ideas to make the system better are more than welcome, of course.
I was looking at checking the size of the arrays and merging more carefully, but it all just ended in a nasty infinite loop of some kind, which broke osx (had to hard power off )
Most of my work on improving oolite has been looking at factoring out duplicate code, using more inheritance instead of duplication -- but my concern is that it is wasted effort as I cannot commit to svn. I thought about pmming diffs to someone (like you?) and asking if you are happy to commit, but I am not sure if that is a good idea. Moving big chunks of code around makes merging really awkward.
For SVN access (and joining the project as well, we are always in need of active coders) you would probably want to PM Ahruman, Winston or Giles himself. As for the diffs, these need to be thoroughly tested before commiting, but I would not mind at all having a look at them