mirror of
https://github.com/djhackersdev/minime.git
synced 2026-08-20 01:14:08 -05:00
idz: Fix backwards compatibility
Silently drop OOB course IDs instead of erroring. Those IDs may come from later versions which have bigger arrays in that spot.
This commit is contained in:
@@ -53,7 +53,7 @@ export function loadProfile2(res: LoadProfileResponse2) {
|
||||
|
||||
for (const [courseId, playCount] of res.coursePlays.entries()) {
|
||||
if (courseId < 0 || courseId >= 16) {
|
||||
throw new Error(`Course id out of range: ${courseId}`);
|
||||
continue;
|
||||
}
|
||||
|
||||
buf.writeUInt16LE(playCount, 0x0460 + 2 * courseId);
|
||||
|
||||
Reference in New Issue
Block a user