Fix pool bounds.
This commit is contained in:
parent
77a752a2ee
commit
35ff248687
@ -62,7 +62,7 @@ guac_layer* guac_client_alloc_layer(guac_client* client) {
|
|||||||
guac_layer* allocd_layer;
|
guac_layer* allocd_layer;
|
||||||
|
|
||||||
/* If available layers, pop off first available layer */
|
/* If available layers, pop off first available layer */
|
||||||
if (client->__next_layer_index >= GUAC_BUFFER_POOL_INITIAL_SIZE &&
|
if (client->__next_layer_index > GUAC_BUFFER_POOL_INITIAL_SIZE &&
|
||||||
client->__available_layers != NULL) {
|
client->__available_layers != NULL) {
|
||||||
|
|
||||||
allocd_layer = client->__available_layers;
|
allocd_layer = client->__available_layers;
|
||||||
@ -96,7 +96,7 @@ guac_layer* guac_client_alloc_buffer(guac_client* client) {
|
|||||||
guac_layer* allocd_layer;
|
guac_layer* allocd_layer;
|
||||||
|
|
||||||
/* If available layers, pop off first available buffer */
|
/* If available layers, pop off first available buffer */
|
||||||
if (client->__next_buffer_index <= -GUAC_BUFFER_POOL_INITIAL_SIZE &&
|
if (client->__next_buffer_index < -GUAC_BUFFER_POOL_INITIAL_SIZE &&
|
||||||
client->__available_buffers != NULL) {
|
client->__available_buffers != NULL) {
|
||||||
|
|
||||||
allocd_layer = client->__available_buffers;
|
allocd_layer = client->__available_buffers;
|
||||||
|
Loading…
Reference in New Issue
Block a user