mirror of
https://github.com/motajs/template.git
synced 2026-11-25 23:44:37 +08:00
fix(07-10): 写入路径越界校验与读流跨读档过期
- insert/delete/set 在 disabled 早退后、任何缓冲读写前校验 index,越界不修改任何缓冲区并告警新码 179(携带操作名/索引/当前长度) - insert(index === length) 判为合法追加,按 add 语义写入(paramUsed 起、indexArray[length] = paramUsed),insert 合法区间变为 [0, length] - setReplayArray 在 rebuildIndexArray 后补 expireStreams(),活跃读流跨 ReplaySystem.loadState 标记过期(#06-17-3 / 审计 H) - types.ts 的 insert/delete/set jsDoc 写明合法区间与越界契约 - logger.json 新增 warn 179(当前最大 warn 码 178 之后) - array.test.ts 新增 5 条边界回归(含越界前后逐字节不变量);saveLoad.test.ts 新增活跃读流跨读档告警 156 回归
This commit is contained in:
1 parent
9ae28c68cc
commit
1f9fb18cf5
5 files changed
+158
-5
No files matched your search
@@ -253,6 +253,7 @@
|
||||
"176": "Cannot add move step to replay system since only 'up,right,down,left' directions are acceptable.",
|
||||
"177": "Save data for saveable content $1 is needed, but there's no data in save data. Maybe a version issue for it? System will try to load other contents to make game run normally.",
|
||||
"178": "Save data with keys of '$1' are saved but not be loaded, is there some issue for it?",
|
||||
"179": "Replay $1 received an out-of-range index $2, the current replay length is $3. The operation will be ignored.",
|
||||
"1001": "Event(setBlock): Unknown tile '$1' when setting block."
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user