fixed #395 heap corruption in nk_buffer
This commit is contained in:
parent
7d5648db30
commit
89e6ed6b5a
@ -11,6 +11,7 @@
|
||||
|
||||
Changes:
|
||||
--------
|
||||
- 2017/04/09 (1.35.3) - Fixed buffer heap corruption
|
||||
- 2017/03/25 (1.35.2) - Fixed popup overlapping for `NK_WINDOW_BACKGROUND` windows
|
||||
- 2017/03/25 (1.35.1) - Fixed windows closing behavior
|
||||
- 2017/03/18 (1.35.0) - Added horizontal scroll requested in #377
|
||||
|
@ -5468,7 +5468,7 @@ nk_buffer_alloc(struct nk_buffer *b, enum nk_buffer_allocation_type type,
|
||||
/* check if buffer has enough memory*/
|
||||
if (type == NK_BUFFER_FRONT)
|
||||
full = ((b->allocated + size + alignment) > b->size);
|
||||
else full = ((b->size - (size + alignment)) <= b->allocated);
|
||||
else full = ((b->size - NK_MIN(b->size,(size + alignment))) <= b->allocated);
|
||||
|
||||
if (full) {
|
||||
nk_size capacity;
|
||||
|
Loading…
Reference in New Issue
Block a user