mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 03:18:11 +00:00
keymap: Fix crash introduced by 637ecdb
Just because a Vector has some inline capacity doesn't mean we can put data at offsets < Vector::size(). Fixes #2104.
This commit is contained in:
parent
454c1e6bbe
commit
7dd49047f3
1 changed files with 1 additions and 0 deletions
|
@ -44,6 +44,7 @@ static Vector<char> read_map(const JsonObject& json, const String& name)
|
|||
return {};
|
||||
|
||||
Vector<char, 0x80> map;
|
||||
map.resize(0x80);
|
||||
auto map_arr = json.get(name).as_array();
|
||||
|
||||
for (int i = 0; i < map_arr.size(); i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue