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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user