Fix incorrect sizeof use in rna array formatting

This commit is contained in:
Campbell Barton 2019-01-26 23:17:31 +11:00
parent 04a5dbbd09
commit 9e3ac14341
1 changed files with 1 additions and 1 deletions

View File

@ -6937,7 +6937,7 @@ static int rna_function_format_array_length(const char *format, int ofs, int fle
int idx = 0;
if (format[ofs++] == '[')
for (; ofs < flen && format[ofs] != ']' && idx < sizeof(*lenbuf) - 1; idx++, ofs++)
for (; ofs < flen && format[ofs] != ']' && idx < sizeof(lenbuf) - 1; idx++, ofs++)
lenbuf[idx] = format[ofs];
if (ofs < flen && format[ofs + 1] == ']') {