diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-09-11 21:25:13 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-09-11 21:25:13 (GMT) |
commit | 83faef9c8f78b20cb031af686f763cfb215cf9d7 (patch) | |
tree | ea95f741855044f4473573726804c6c2bcac5db1 /src/analysis/db/misc | |
parent | 3e1347d378e7ff0e21fb53b61e0317b8dfe52fc9 (diff) |
Reactivated bookmarks for disassembled code.
Diffstat (limited to 'src/analysis/db/misc')
-rw-r--r-- | src/analysis/db/misc/rlestr.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/analysis/db/misc/rlestr.c b/src/analysis/db/misc/rlestr.c index f26c146..0fe182b 100644 --- a/src/analysis/db/misc/rlestr.c +++ b/src/analysis/db/misc/rlestr.c @@ -105,6 +105,9 @@ void init_static_rle_string(rle_string *str, const char *data) void dup_into_rle_string(rle_string *str, const char *data) { + if (str->data != NULL) + unset_rle_string(str); + if (data != NULL) { str->data = strdup(data); @@ -144,6 +147,11 @@ void set_dynamic_rle_string(rle_string *str, char *data) str->length = strlen(data); str->dynamic = true; } + else + { + str->data = NULL; + str->length = 0; + } } @@ -172,6 +180,11 @@ void set_static_rle_string(rle_string *str, const char *data) str->length = strlen(data); str->dynamic = false; } + else + { + str->data = NULL; + str->length = 0; + } } |