Fix #109024: Off-by-1 in rna_access for non-array props without raw access #115967

Open
Thomas Barlow wants to merge 4 commits from Mysteryem/blender:fix_109024_non_raw_non_array_off_by_one into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Showing only changes of commit e78c8fa210 - Show all commits

View File

@ -4591,7 +4591,7 @@ static int rna_raw_access(ReportList *reports,
BKE_reportf(reports,
RPT_ERROR,
"Array length mismatch (expected %d, got %d)",
out.len * arraylen,
out.len * itemlen,
in.len);
return 0;
}
@ -4602,7 +4602,7 @@ static int rna_raw_access(ReportList *reports,
void *outp = out.array;
int a, size;
size = RNA_raw_type_sizeof(out.type) * arraylen;
size = RNA_raw_type_sizeof(out.type) * itemlen;
for (a = 0; a < out.len; a++) {
if (set) {