Warning=>Debug when -1 is passed to GetImage

This commit is contained in:
Isaac Connor 2021-12-14 10:25:48 -05:00
parent 3a8c740a69
commit 3ee649406c
1 changed files with 1 additions and 1 deletions

View File

@ -1175,7 +1175,7 @@ void Monitor::AddPrivacyBitmask() {
int Monitor::GetImage(int32_t index, int scale) { int Monitor::GetImage(int32_t index, int scale) {
if (index < 0 || index > image_buffer_count) { if (index < 0 || index > image_buffer_count) {
Warning("Invalid index %d passed. image_buffer_count = %d", index, image_buffer_count); Debug(1, "Invalid index %d passed. image_buffer_count = %d", index, image_buffer_count);
index = shared_data->last_write_index; index = shared_data->last_write_index;
} }
if (!image_buffer.size() or static_cast<size_t>(index) >= image_buffer.size()) { if (!image_buffer.size() or static_cast<size_t>(index) >= image_buffer.size()) {