mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 09:46:04 -05:00
Keymap: Fix map initialization
Correct the number of keymap entries and initialize them. Fixes #1017
This commit is contained in:
parent
1bb98c6950
commit
cdeae8a6f3
Notes:
sideshowbarker
2024-07-19 10:20:43 +09:00
Author: https://github.com/xTibor Commit: https://github.com/SerenityOS/serenity/commit/cdeae8a6f37 Pull-request: https://github.com/SerenityOS/serenity/pull/1021
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ char* read_map(const JsonObject& json, const String& name)
|
|||
if (!json.has(name))
|
||||
return nullptr;
|
||||
|
||||
char* map = new char[80];
|
||||
char* map = new char[0x80]();
|
||||
auto map_arr = json.get(name).as_array();
|
||||
|
||||
for (int i = 0; i < map_arr.size(); i++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue