fix: Potential error when parsing Intel Hex and Motorola SREC files
This commit is contained in:
parent
cec925bcdc
commit
1f05deddc8
@ -49,7 +49,7 @@ namespace hex::plugin::builtin {
|
|||||||
} recordType;
|
} recordType;
|
||||||
|
|
||||||
auto c = [&] {
|
auto c = [&] {
|
||||||
while (std::isspace(string[offset]) && offset < string.length())
|
while (offset < string.length() && std::isspace(string[offset]))
|
||||||
offset++;
|
offset++;
|
||||||
|
|
||||||
if (offset >= string.length())
|
if (offset >= string.length())
|
||||||
|
@ -34,7 +34,7 @@ namespace hex::plugin::builtin {
|
|||||||
std::vector<u8> data;
|
std::vector<u8> data;
|
||||||
|
|
||||||
auto c = [&] {
|
auto c = [&] {
|
||||||
while (std::isspace(string[offset]) && offset < string.length())
|
while (offset < string.length() && std::isspace(string[offset]))
|
||||||
offset++;
|
offset++;
|
||||||
|
|
||||||
if (offset >= string.length())
|
if (offset >= string.length())
|
||||||
|
Loading…
Reference in New Issue
Block a user