Browse Source

* Allow to resize canvases back to (0,0).

tags/v0.99.beta14
Sam Hocevar sam 18 years ago
parent
commit
fae8b54e54
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      cucul/cucul.c

+ 4
- 4
cucul/cucul.c View File

@@ -259,8 +259,8 @@ int _cucul_set_canvas_size(cucul_canvas_t *cv, unsigned int width,
cv->allchars[f] = realloc(cv->allchars[f],
new_size * sizeof(uint32_t));
cv->allattrs[f] = realloc(cv->allattrs[f],
new_size * sizeof(uint32_t));
if(!cv->allchars[f] || !cv->allattrs[f])
new_size * sizeof(uint32_t));
if(new_size && (!cv->allchars[f] || !cv->allattrs[f]))
{
#if defined(HAVE_ERRNO_H)
errno = ENOMEM;
@@ -353,8 +353,8 @@ int _cucul_set_canvas_size(cucul_canvas_t *cv, unsigned int width,
cv->allchars[f] = realloc(cv->allchars[f],
new_size * sizeof(uint32_t));
cv->allattrs[f] = realloc(cv->allattrs[f],
new_size * sizeof(uint32_t));
if(!cv->allchars[f] || !cv->allattrs[f])
new_size * sizeof(uint32_t));
if(new_size && (!cv->allchars[f] || !cv->allattrs[f]))
{
#if defined(HAVE_ERRNO_H)
errno = ENOMEM;


Loading…
Cancel
Save