mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-21 12:42:25 +00:00
Merge pull request #3592 from aaronjanse/allocation_typo
fix allocation typo
This commit is contained in:
commit
7c48db7da8
1 changed files with 1 additions and 1 deletions
|
|
@ -306,7 +306,7 @@ png_path_to_bitmap(const char* path, uint8_t** data, unsigned int* width, unsign
|
|||
unsigned char *buf = malloc(capacity);
|
||||
if (!buf) { log_error("Out of memory reading PNG file at: %s", path); fclose(fp); return false; }
|
||||
while (!feof(fp)) {
|
||||
if (pos - capacity < 1024) {
|
||||
if (capacity - pos < 1024) {
|
||||
capacity *= 2;
|
||||
unsigned char *new_buf = realloc(buf, capacity);
|
||||
if (!new_buf) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue