Commit f6b3db2
fix: pushRolling + trimArray crash on Java ModData tables
Both functions used #arr (crashes on Java-backed ModData) and
table.remove(arr, 1) (also crashes). These are called by POSnet's
POS_RumourGenerator.addRumour() which stores rumours in world ModData.
pushRolling: #arr+1 → pairs() count + explicit index
trimArray: #arr loop + table.remove → rebuild approach (sort by index,
remove oldest, reindex to sequential keys, clear and rewrite)
Same root cause as the InvestmentLog/OperationLog fixes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 96e6626 commit f6b3db2
1 file changed
Lines changed: 45 additions & 4 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
34 | 54 | | |
35 | | - | |
36 | | - | |
37 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
38 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
39 | 75 | | |
40 | 76 | | |
41 | 77 | | |
| |||
51 | 87 | | |
52 | 88 | | |
53 | 89 | | |
54 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
55 | 96 | | |
56 | 97 | | |
57 | 98 | | |
| |||
0 commit comments