mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
Merge pull request #1270 from ihsinme/ihsinme-patch-238
correction of incorrect sequence of checks.
This commit is contained in:
commit
33b4154b0c
@ -63,14 +63,14 @@ int write_buffer(int handle, const void *data, int size)
|
|||||||
const char *cdata = data;
|
const char *cdata = data;
|
||||||
int next_size;
|
int next_size;
|
||||||
|
|
||||||
|
if (size <= 0)
|
||||||
|
return size;
|
||||||
|
|
||||||
if (write_buffer_max_blocks <= 0) {
|
if (write_buffer_max_blocks <= 0) {
|
||||||
/* no write buffer */
|
/* no write buffer */
|
||||||
return write(handle, data, size);
|
return write(handle, data, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (size <= 0)
|
|
||||||
return size;
|
|
||||||
|
|
||||||
rec = g_hash_table_lookup(buffers, GINT_TO_POINTER(handle));
|
rec = g_hash_table_lookup(buffers, GINT_TO_POINTER(handle));
|
||||||
if (rec == NULL) {
|
if (rec == NULL) {
|
||||||
rec = g_new0(BUFFER_REC, 1);
|
rec = g_new0(BUFFER_REC, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user