diff options
| -rw-r--r-- | apps/filetypes.c | 2 | ||||
| -rw-r--r-- | apps/tree.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/filetypes.c b/apps/filetypes.c index 8f2e912..d275c65 100644 --- a/apps/filetypes.c +++ b/apps/filetypes.c @@ -190,7 +190,7 @@ static int move_callback(int handle, void* current, void* new) (void)handle; size_t diff = new - current; #define FIX_PTR(x) \ - { if ((void*)x > current && (void*)x < (current+strdup_bufsize)) x+= diff; } + { if ((void*)x >= current && (void*)x < (current+strdup_bufsize)) x+= diff; } for(int i = 0; i < filetype_count; i++) { FIX_PTR(filetypes[i].extension); diff --git a/apps/tree.c b/apps/tree.c index ca4c567..2fcaba7 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -1019,7 +1019,7 @@ static int move_callback(int handle, void* current, void* new) size_t diff = new - current; /* FIX_PTR makes sure to not accidentally update static allocations */ #define FIX_PTR(x) \ - { if ((void*)x > current && (void*)x < (current+cache->name_buffer_size)) x+= diff; } + { if ((void*)x >= current && (void*)x < (current+cache->name_buffer_size)) x+= diff; } if (handle == cache->name_buffer_handle) { /* update entry structs, *even if they are struct tagentry */ |