Closed A0nameless0man closed 1 year ago
This line reserves 4 ArrayVec with capacity of 24 to record kawa.
https://github.com/Equim-chan/Mortal/blob/c357889efffeeaa787d926358c71412ea5ecf77d/libriichi/src/state/player_state.rs#L75
Which isn't adequate because this lines can push at most 8 None into it .
None
https://github.com/Equim-chan/Mortal/blob/c357889efffeeaa787d926358c71412ea5ecf77d/libriichi/src/state/update.rs#L692-L699
In my test , program sometimes crash at this line.
https://github.com/Equim-chan/Mortal/blob/c357889efffeeaa787d926358c71412ea5ecf77d/libriichi/src/state/update.rs#L233
This has been fixed in v2 but not yet ported to v1 (this repo). The fix simply goes by changing ArrayVec to TinyVec.
ArrayVec
TinyVec
This line reserves 4 ArrayVec with capacity of 24 to record kawa.
https://github.com/Equim-chan/Mortal/blob/c357889efffeeaa787d926358c71412ea5ecf77d/libriichi/src/state/player_state.rs#L75
Which isn't adequate because this lines can push at most 8
None
into it .https://github.com/Equim-chan/Mortal/blob/c357889efffeeaa787d926358c71412ea5ecf77d/libriichi/src/state/update.rs#L692-L699
In my test , program sometimes crash at this line.
https://github.com/Equim-chan/Mortal/blob/c357889efffeeaa787d926358c71412ea5ecf77d/libriichi/src/state/update.rs#L233