diff --git a/include/neuron/type.h b/include/neuron/type.h index 63e46fb2..dcad7fb6 100644 --- a/include/neuron/type.h +++ b/include/neuron/type.h @@ -156,6 +156,7 @@ typedef struct { } neu_value_ptr_t; #define NEU_VALUE_SIZE 512 +#define NEU_ARRAY_SIZE 128 typedef struct { uint8_t bytes[NEU_VALUE_SIZE]; diff --git a/plugins/restful/rw_handle.c b/plugins/restful/rw_handle.c index dd0e9742..99d89bb9 100644 --- a/plugins/restful/rw_handle.c +++ b/plugins/restful/rw_handle.c @@ -284,7 +284,7 @@ void handle_write(nng_aio *aio) } if (req->t == NEU_JSON_ARRAY_INT64 && - req->value.val_array_int64.length > NEU_VALUE_SIZE) { + req->value.val_array_int64.length > NEU_ARRAY_SIZE) { NEU_JSON_RESPONSE_ERROR(NEU_ERR_STRING_TOO_LONG, { neu_http_response(aio, NEU_ERR_STRING_TOO_LONG, result_error);