mirror of
https://github.com/lifegpc/msg-tool.git
synced 2026-07-08 01:31:53 +08:00
修复边界情况
This commit is contained in:
@@ -106,7 +106,7 @@ impl BGIBpScript {
|
|||||||
let text_address = reader.pos + text_offset as usize - 1;
|
let text_address = reader.pos + text_offset as usize - 1;
|
||||||
if text_address >= last_instr_pos
|
if text_address >= last_instr_pos
|
||||||
&& text_address < reader.data.len()
|
&& text_address < reader.data.len()
|
||||||
&& (text_address == last_instr_pos || reader.data[text_address - 1] == 0)
|
&& (text_address <= last_instr_pos + 1 || reader.data[text_address - 1] == 0)
|
||||||
{
|
{
|
||||||
strings.push(BpString {
|
strings.push(BpString {
|
||||||
offset_pos: reader.pos,
|
offset_pos: reader.pos,
|
||||||
|
|||||||
Reference in New Issue
Block a user