don't write to NULL buffer
If we have checked for allocation failure, no need to write to buffer. CID 1100648
This commit is contained in:
parent
fe45b5c73f
commit
1c53e10b42
|
@ -123,10 +123,13 @@ _handle_buf(Termpty *ty, const Eina_Unicode *codepoints, int len)
|
|||
{
|
||||
ERR("memerr");
|
||||
}
|
||||
bytes = (char *)ce - (char *)c;
|
||||
memcpy(ty->buf, c, bytes);
|
||||
ty->buflen = bytes / sizeof(Eina_Unicode);
|
||||
ty->buf[ty->buflen] = 0;
|
||||
else
|
||||
{
|
||||
bytes = (char *)ce - (char *)c;
|
||||
memcpy(ty->buf, c, bytes);
|
||||
ty->buflen = bytes / sizeof(Eina_Unicode);
|
||||
ty->buf[ty->buflen] = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
c += n;
|
||||
|
|
Loading…
Reference in New Issue