1
mirror of https://github.com/flipperdevices/flipperzero-firmware.git synced 2025-12-12 04:41:26 +04:00

Gui text box: fix formatted string memory reservation (#3447)

* text box: reserve correct memory size to avoid reallocation
* Furi: change string reset behavior to release memory, prevent realloc call. Gui: fix NULL-ptr dereference in TextBox.

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
gornekich
2024-02-14 04:19:05 +00:00
committed by GitHub
parent 3c77dc7930
commit a46038acbf
2 changed files with 14 additions and 5 deletions

View File

@@ -71,7 +71,8 @@ void furi_string_reserve(FuriString* s, size_t alloc) {
}
void furi_string_reset(FuriString* s) {
string_reset(s->string);
string_clear(s->string);
string_init(s->string);
}
void furi_string_swap(FuriString* v1, FuriString* v2) {