From f1dcb785a125077be0575b86fc0507d6f4e911f7 Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 14 May 2018 16:40:45 +0100 Subject: [PATCH] Fix implementation of array_setsubscript when deleting a range --- qrenderdoc/Code/pyrenderdoc/container_handling.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qrenderdoc/Code/pyrenderdoc/container_handling.h b/qrenderdoc/Code/pyrenderdoc/container_handling.h index 235fd915f..032beeb63 100644 --- a/qrenderdoc/Code/pyrenderdoc/container_handling.h +++ b/qrenderdoc/Code/pyrenderdoc/container_handling.h @@ -620,7 +620,7 @@ int array_setsubscript(arrayType *thisptr, PyObject *idxobj, PyObject *val) // if we're stepping forwards, erasing the earlier indices will have moved the ones to // delete, so adjust the index based on how many we've deleted. // if we're stepping backwards then there's no need to change anything - if(step > 1) + if(step >= 1) idx -= count; ExtRefcount::Dec(thisptr->at((size_t)idx));