diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-02-25 14:59:34 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-02-25 14:59:34 +0100 |
commit | 95c526e1f6d76acafee4b21f5701d6d6ac8c4b5f (patch) | |
tree | bd5c3b788fbd7995938325c97c3ff4c2d72b9b94 /src/structs.h | |
parent | d3f78dc9ebd729475a7f24a50a91112e300d5ac9 (diff) | |
download | vim-git-95c526e1f6d76acafee4b21f5701d6d6ac8c4b5f.tar.gz |
patch 8.0.0365: might free a dict item that wasn't allocatedv8.0.0365
Problem: Might free a dict item that wasn't allocated.
Solution: Call dictitem_free(). (Nikolai Pavlov) Use this for
b:changedtick.
Diffstat (limited to 'src/structs.h')
-rw-r--r-- | src/structs.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/structs.h b/src/structs.h index 23ce826a3..1e1b1da82 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1916,9 +1916,10 @@ struct file_buffer int b_changed; /* 'modified': Set to TRUE if something in the file has been changed and not written out. */ - varnumber_T *b_changedtick; /* points into b:changedtick or b_ct_val; + dictitem16_T b_ct_di; /* holds the b:changedtick value in + b_ct_di.di_tv.vval.v_number; incremented for each change, also for undo */ - varnumber_T b_ct_val; /* fallback for b:changedtick */ +#define CHANGEDTICK(buf) ((buf)->b_ct_di.di_tv.vval.v_number) int b_saving; /* Set to TRUE if we are in the middle of saving the buffer. */ |